[Pythonmac-SIG] appscript path problem from a newbie
has
hengist.podd at virgin.net
Tue Apr 15 12:53:08 CEST 2008
John Ott wrote:
> I am getting file not found errors from appscript.
>
> I manually open my OmniOutliner file Projets.oo3 first then from a
> xterm
> window:
>
> python
> from appscript import *
> oop = app('OmniOutliner Professional')
> pod = oop.documents['Projects.oo3']
>
> A second copy of OmniOutliner Professional is started and a new file
> is
> opened then I get my error. I'm suspecting an path variable not set
> properly but I can't find where to set it. Any ideas?
The only thing the above code does is locate OO, launch it if it isn't
already running, and get its terminology. (Note: it won't do anything
to your 'Projects.oo3' document as you haven't sent a command.)
Do you have more than one copy of OO installed? Appscript uses
LaunchServices to locate applications by name/bundle id/creator code,
so it may be that the LS database points to a different copy of OO to
the one you're running. If you need to be more specific, you can
identify applications by their full path or unix process id; see
chapter 7 of the appscript manual for details.
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
More information about the Pythonmac-SIG
mailing list