UI Scripting a radio button under Panther
UI Scripting a radio button under Panther
- Subject: UI Scripting a radio button under Panther
- From: Henrik Boes <email@hidden>
- Date: Thu, 20 Nov 2003 17:53:32 -0700
Hello,
I am trying to write a script that uses UI scripting under Panther to
click on the "On" radio button in the Retrospect 5.0 client. (Retro
client 5 -- specifically the pitond process it uses -- gets disabled
upon restart under Panther and does not get restarted at log-on as it
did under Jaguar; it's a known bug at this time, according to Dantz.
Since I am not able to launch the pitond service itself via a shell
script -- any help on this angle would be appreciated as well -- I
decided to try UI scripting).
Here's the script, compiled with the help of UI Browser 1.2:
tell application "Retrospect Client" to activate
tell application "System Events"
if UI elements enabled then
click radio button "On (1)" of radio group 1 of window "Retrospect
Client" of application "Retrospect Client"
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable
access for assistive devices\""
end tell
end if
delay 5
tell application "Retrospect Client" to quit
end tell
The error I tells me that the element does not understand the click
command. Using Apple's UIElementInspector, I was able to determine that
the radio button uses an action of "press" instead of "click".
(Actions: AXPress - press). However, Script Editor won't compile the
script using "press" saying "Expected end of line but found class
name."
Thoughts?
System: OS X 10.3.1
TIA.
Henrik Boes
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.