An AppleScript hello, world example

Want to get started writing your own AppleScript programs? If so, just open the Applications folder, then the AppleScript folder, and then double-click the ScriptEditor. This is the application you use to edit your AppleScript programs.

As a quick little test, once you have the ScriptEditor open, type this text into the editor:

display dialog "Hello, world"

Then press the Run button. You should see the text "Hello, world" displayed in a dialog, with Cancel and OK buttons, as shown in the following figure:

A simple AppleScript dialog.

Just click one of the buttons to discard the dialog and you're ready to start writing your own AppleScript programs.

Add new comment

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.