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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap