Aviva Directory » Computers & Internet » Programming » AppleScript

Created by Apple in 1993, AppleScript is a scripting language that allows for automation of scriptable Mac applications.

AppleScript is used to refer to the language, to an individual script written in the language, or to the macOS Open Scripting Architecture that powers the language.

AppleScript was primarily developed to perform inter-application communications between Apple events, but it has processing capabilities of its own, such as basic calculations and text processing. It may also be extended to allow for the use of scripting additions, adding new functions to the language.

AppleScript includes elements of natural language programming, object-oriented programming, and procedural programming, but it does not strictly conform to any of these paradigms.

The origins of AppleScript go back to the late 1980s, when Apple was considering adopting the HyperCard HyperTalk scripting language as the standard language for end-user development across the company, and within its class Mac OS, as well as for interprocess communications between Apple products and third-party products used in Macs. Apple developers decided, instead, that a similar, but more object-oriented scripting language could be designed to be used with any Mac application. Thus, AppleScript was created as a spinoff of research designed to modernize the Macintosh as a whole, and it became part of System 7.1.1, also known as System 7 Pro.

There was a question of its continuance in the next generation of Apple operating systems, Mac OS X, around 2002. Cocoa applications allowed developers to implement scriptability for their apps with less effort. However, the shift to Unix underpinnings in Mac OS X, and AppleScript's ability to directly run Unix commands, allowed to have greater control over the operating system itself. AppleScript Studio, released with Mac OS X 10.2, allowed users to build Cocoa applications using AppleScript.

It is currently included in all versions of macOS. AppleScript Editor, often known simply as Script Editor, allows for the recording of user actions, for recordable apps. Recorded actions are then converted to the equivalent AppleScript commands and output to the Script Editor window, where it can be saved and re-run to duplicate the original actions. Script Editor can write in both AppleScript and JavaScript.

A third-party tool, known as Script Debugger, is a commercial IDE for AppleScript, providing for a more advanced AppleScript environment that allows the script writer to debug AppleScripts.

Smile and SmileLab are another third-party IDE for AppleScript, Smile being free, while SmileLab is a commercial product.

AppleScript is the focal point of topics found in this category. Appropriate resources include the Apple product itself, any third-party IDEs, editors, or other tools, as well as user groups, forums, tutorials, or guides.

 

 

Recommended Resources


Search for AppleScript on Google or Bing