In article <a24dfb64-8a67-4fe6-88e9-a26a2a14d...@securityevaluators.com>, Charles Miller <cmil...@securityevaluators.com> wrote: > 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 opposed to just popen/system > or something because I'd like to eventually do it remotely (without > ssh) so I can run Preview remotely and operate on the GUI remotely > using applescript.
You don't need to involve the Finder: >>> from appscript import * >>> preview = app(id='com.apple.Preview') >>> preview.run() >>> preview.open('/Developer/About Xcode Tools.pdf') http://appscript.sourceforge.net/py-appscript/doc/appscript-manual/07_app licationobjects.html -- Ned Deily, n...@acm.org _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig