3. Add a Button. Select the button in the ToolBox and drag & drop it where you like.

4. Edit the Value of the button to say "Click Me!"

5. We can actually run the program now. Choose Run...Start in Desktop Browser. It runs in your default browser: we recommend using Chrome or Safari, as these support the WebKit extensions which mobile devices use. We could even run this on a device, but let's do a bit more first...

6. In the Properties Editor, choose Events. It will show a popup with with the events for buttons. Near the top, you will see 'onclick'. Select that, and you will go into the Code Window:

7. Add the following code into the function:

alert( "Hello World");

or, for a better appearance,

NSB.MsgBox("Hello World");

8. Now, run it again and click on "Click Me!"

Run on an iPhone

1. Good work! Now let's run it on a phone. From the Run menu, choose Deploy, then pick the 3rd option: (We're using an iPhone here. We'll do it for Android next.)

2. Now, get your iPhone and go into Safari. Enter in the URL from the last step.

3. Hit Go. The page will appear. You can tap on "Click Me!", and you'll see: a working app in AppStudio.

4. But this isn't a real app: it's just a web page that looks like one. Let's turn it into a real app on the Home Screen. First, we'll tap on the box with an arrow icon at the bottom of the screen.

5. Choose "Add To Home Screen", then click on Add.

6. We're done. Let's have a look. Here is the Home Screen:

7. Click on the HelloWorld icon, and this splash screen shows up:

8. Now the app itself is showing. Notice the top Safari bar is not there? This app now looks and runs like a normal phone app. It will even run if the device is offline.

Run on an Android device

On Android the procedure is even simpler.

1. Here is how our app looks.

2. Tap on the menu button to bring up your choices. Click on Add to homescreen.