[Pythonmac-SIG] appscript: click command not working
Demian Godon
dgodon at comcast.net
Sat Apr 23 10:10:37 CEST 2005
Question from a newbie (to both applescript and python):
Can someone please explain why the following script does not cause the
"Start Server" button to be clicked?
<Begin>
#!/usr/bin/pythonw
from appscript import *
app('/Applications/Utilities/OSXvnc.app').activate()
app('System
Events').application_processes['OSXvnc'].windows[1].buttons[4].click()
<End>
The equivelant applescript works:
activate application "OSXvnc"
tell application "System Events"
tell application process "OSXvnc"
-- GUI Scripting statements:
click button 4 of window 1
end tell
end tell
Thanks,
-D
More information about the Pythonmac-SIG
mailing list