In article
<[email protected]>,
Charles Miller <[email protected]> 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,
[email protected]
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig