Scripting Geniecommands
The backend driving GenieCommands uses a technology called AppleScript and many programs such as iTunes have libraries of AppleScript commands to do simple tasks. For example play iTunes Playlist then activate Visuals, great for starting up a party.
|
The Basics |
AppleScript is an English-like language used to write script files that automate the actions of the computer and the applications that run on it. Much more than a macro-language that simply repeats your recorded actions, AppleScript can make decisions based on user interaction or by interpreting and analyzing data, documents or events.
Scripts can also now be executed on a schedule or at a specified time, day, or week. iCal 1.5 includes the ability to set the execution of scripts as an action for calendar events. Your Mac can now become your alarm clock with a script that wakes you by playing your favorite iTunes playlist!
Two new utilities for creating Folder Action "hot folders" that automatically process items placed in them. You can apply and administer Folder Actions in the Finder with new Folder Actions controls on the Finder's contextual menu, right click on folder. For system-wide control of your hot folders, use the new Folder Actions Setup application to administer all details of your automation setups.
|
|
The Graphic User Interface (GUI)
|
Scripters have the ability to control, via AppleScript, applications that either do not have AppleScript support or are only partially scriptable. Mac OS X v10.3 and above includes support for the control of the computer's graphic user interface via AppleScript.
GUI scripting allows scriptable control of applications not supporting AppleScript directly. The menus, windows, and dialogs of these applications can now be queried and controlled via AppleScript's new Graphic User Interface scripting architecture (GUI Scripting). While not the same as "real" script support, GUI Scripting can be essential in creating automated workflows involving applications that currently aren't scriptable.
Graphic user interface control is performed by an updated version of the System Events application. By addressing the System Events application, AppleScript scripts can select menu items, push buttons, enter text into text fields, and generally control the interfaces of most non-Classic applications.
The following pages detail the process of enabling and using the GUI Scripting architecture.
http://www.apple.com/applescript/uiscripting/01.html
|
|
|
|