Re: [Pythonmac-SIG] Using appscript for GUI interaction, button click

2009-09-13 Thread Charles Miller
009, at 12:52 PM, has wrote: Charles Miller wrote: I'm trying to perform the following applescript with the appscript Python module: tell application "System Events" tell process "Preview" to click button "OK" of every window end tell If you'r

[Pythonmac-SIG] Using appscript for GUI interaction, button click

2009-09-12 Thread Charles Miller
I'm trying to perform the following applescript with the appscript Python module: tell application "System Events" tell process "Preview" to click button "OK" of every window end tell Is this possible? The closest I got was import appscript appscript.app('System Events').processes[

Re: [Pythonmac-SIG] Using Finder to open app by id

2009-08-22 Thread Charles Miller
Awesome, thanks for the advice. As much as I'd love to see the "by id" solution, doing it by the file system name will work just fine. Thanks again for your help! Charlie ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.

Re: [Pythonmac-SIG] Using Finder to open app by id

2009-08-22 Thread Charles Miller
n and run "open /Applications/Preview.app" ? On Sat, Aug 22, 2009 at 10:35 AM, Charles Miller > wrote: Thanks for the thought. Unfortunately, the same thing happens with TextEdit, for example. (BTW, you can make Preview AppleScriptable by following directions here http://www.ma

Re: [Pythonmac-SIG] Using Finder to open app by id

2009-08-22 Thread Charles Miller
Thanks for the thought. Unfortunately, the same thing happens with TextEdit, for example. (BTW, you can make Preview AppleScriptable by following directions here http://www.macworld.com/article/53391/2006/10/previewscript.html) The AppleScript Language Guide states that one of the four re

Re: [Pythonmac-SIG] Using Finder to open app by id

2009-08-22 Thread Charles Miller
Thanks. You're right of course, and thanks for the response. However, using such a method remotely won't work because you can't send the run command if the application isn't running already. RuntimeError: Can't get terminology for application (aem.Application(url='eppc://user:p...@192.168

[Pythonmac-SIG] Using Finder to open app by id

2009-08-21 Thread Charles Miller
How can you run the following Applescript in py-appscript? I've tried everything I can think of. tell application "Finder" to open application file id "com.apple.Preview" Obviously, I just want to launch Preview from within py-appscript. I really want to do this in py-appscript as oppos