GUIScripting_status()
activate application "Microsoft Word"
tell application "System Events"
tell process "Microsoft Word"
-- insert GUI Scripting statements here
click menu item "Geluid uit bestand..." of menu 1 of menu item "Audio" of menu 1 of menu bar item "Invoegen" of menu bar 1
end tell
end tell
on GUIScripting_status()
-- check to see if assistive devices is enabled
tell application "System Events"
set UI_enabled to UI elements enabled
end tell
if UI_enabled is false then
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.universalaccess"
display dialog "This script utilizes the built-in Graphic User Interface Scripting architecture of Mac OS x which is currently disabled." & return & return & "You can activate GUI Scripting by selecting the checkbox \"Enable access for assistive devices\" in the Universal Access preference pane." with icon 1 buttons {"Cancel"} default button 1
end tell
end if
end GUIScripting_status