[Pythonmac-SIG] appscript: click command not working

has hengist.podd at virgin.net
Sat Apr 23 10:51:20 CEST 2005


Demian Godon wrote:

>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?
>
>app('/Applications/Utilities/OSXvnc.app').activate()
>app('System Events').application_processes['OSXvnc'].windows[1].buttons[4].click()

Not sure. It works on 10.2 (where I am), but this is the second time someone's reported this problem on 10.3. If I can reproduce it when I upgrade to 10.4 I should be able to nail it quite quickly. In the meantime, I believe the alternate form works correctly:

app('System Events').click(app('System Events').application_processes['OSXvnc'].windows[1].buttons[4])


HTH

has
http://freespace.virgin.net/hamish.sanderson/


More information about the Pythonmac-SIG mailing list