Thanks a lot for the links Jordan. Could you tell me why there is a "u" before some names in appscript
for example: menus[u'Apple'] Thanks, Raj On Sat, Jun 7, 2008 at 12:52 PM, Jordan Baker <[EMAIL PROTECTED]> wrote: > On 7-Jun-08, at 3:14 PM, Daniel Lord wrote: >> >> On Jun 7, 2008, at 11:48 AM, Rajanikanth Jammalamadaka wrote: >> >>> Suppose the application pops up a window while its running and gives >>> me two choices: Ok or Cancel >>> how can I tell it to select the Ok option always? >> >> I don't have time to work up a demo right now, but you should be able to >> use System Events: >> >> Apple info: http://www.apple.com/applescript/uiscripting/ > > Here's a blog post that has a Python example you can use: > > http://hexsprite.blogspot.com/2008/03/testing-osx-applications-with-python.html > > Heres some random snippets of code from a test that may or may not be useful > that manipulate a file open dialog. > > myapp.windows['Choose a Folder'].sheets[1].buttons['Go'].click() > myapp.windows['Choose a Folder'].buttons['Choose'].click() > > Have fun, > > -jordan (hexsprite) > -- "For him who has conquered the mind, the mind is the best of friends; but for one who has failed to do so, his very mind will be the greatest enemy." Rajanikanth _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig