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

Charles Miller cmiller at securityevaluators.com
Sat Aug 22 16:39:55 CEST 2009


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:pass@192.168.1.3/Preview')): Command  
failed: Application isn't running. (-600)

So I was hoping to figure out how to do that AppleScript line locally,  
and then try to do it remotely as well.  The real AppleScript I wish  
to run in py-appscript is:

set remoteMachine to "eppc://user:pass@192.168.1.3"
set remoteFinder to application "Finder" of machine remoteMachine
using terms from application "Finder"
	tell remoteFinder
		open application file id "com.apple.Preview"
	end tell
end using terms from

But I figured I'd start easier and just try to launch a local app with  
Finder.  Any ideas on how to do the original question (or even better  
the above) using py-appscript?  Thanks a million.

Charlie



More information about the Pythonmac-SIG mailing list