Introduction to AppleScript

AppleScript is a scripting language that is installed with the operating system onto every Macintosh computer. Scripting differs slightly from programming. Programming generally allows you to write a compiled application that directly controls the behavior of a computer. Scripting allows you to write a set of instructions to control existing applications on a computer. On a Macintosh, this includes the operating system.

AppleScripts are written in an editor application, and Apple has included a script editor in the operating system. Simply called "Script Editor," this application can be used by anyone to write, compile, and save AppleScripts.

Not all Macintosh applications are AppleScriptable. However, there are many well-known applications that are scriptable. It is up to software developers to implement scriptability into their products. Some applications provide little or no support for scripting, while others provide a lot of support. In addition, the quality of AppleScript support can vary greatly from application to application, making some applications easy to script, and others more difficult.

Uses for AppleScript

Whether you know it or not, you have probably used AppleScripts in the past. AppleScript is primarily used to automate repetitive tasks that are performed at regular intervals. Many programs such as application installers and email programs use AppleScripts to perform specialized tasks. The following are some tasks that are commonly automated with AppleScript:

  • Image manipulation and conversion
  • Desktop and database publishing
  • Database maintenance
  • Server maintenance
  • File/Folder maintenance
  • CD/DVD duplication