AppleScript Example with TextEdit


Let us take a look at how to write a simple AppleScript with TextEdit on the Mac.

  1. Open TextEdit application
  2. Write a simple "hello world" example.
    display dialog "Hello, World!"
  3. Save the file with an extension - .scpt
    AppleScript Hello World Example
  4. When you double-click on the file, it will open up Script Editor.
  5. Click on the run button and you should see a prompt with "Hello, World!"
Running AppleScript
-




Have Questions? Post them here!