With Mac OS X Leopard and earlier, and OS X Yosemite and later, Script Editor is located at
/Applications/Utilities/Script Editor.app
Between Mac OS X Snow Leopard and OS X Mavericks inclusive, Script Editor is AppleScript Editor.
/Applications/Utilities/AppleScript Editor.app
Enter the following line of code:
display dialog "Hello World"
Click the run button.
Two things happen: Script Editor compiles your script (if there are any errors, it'll let you know what's wrong and where), and then runs it.
You will now be shown a dialog saying "Hello World".
You've completed your first script!
display dialog
is one command, though it uses two words. This is common in AppleScript, unlike other languages which commonly require joining words together with no spaces. The display dialog
command tells AppleScript to display a pop-up dialog.
This last part in "double quotes" tells the script what text to display.