![]() |
|
|
|
|
|
|
|
|
ACTIVATING UI SCRIPTING The GUI Scripting architecture is based upon the Mac OS X accessibility frameworks that provide alternative methods of querying and controlling the interfaces of the OS and applications. By default, the accessibility frameworks are disabled. An administrative user can enable them by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane and entering their password in the forthcoming authentication dialog. ![]() Once the accessibility frameworks have been activated, AppleScript can be used to query and control the user interface of most applications. Scripted actions are performed by addressing the System Events application which has a special script suite for communicating with the GUI Scripting architecture. Checking Accessibility Status In order for UI scripts to function, the accessibility frameworks must be active. The System Events application has a special property named UI elements enabled that returns a value of true or false depending upon the current accessibility state. Include the following sub-routine in your scripts to check for the presence of Mac OS X v.10.3 and an activated GUI Scripting architecture.
on UIscript_check() end UIscript_check |
TABLE OF CONTENTS Introduction Activating UI Scripting - Enabling the GUI Scripting architecture UI Element Inspector - Discovering an object's heirarchy Example Scripts - Example scripts and routines |