[Pythonmac-SIG] Python app with aemreceive is not scriptable

Kevin Walzer kw at codebykevin.com
Mon Jan 11 03:31:17 CET 2010


On 1/10/10 3:08 PM, Kevin Walzer wrote:

> What's the best way to structure the command so that it can be seen from
> AppleScript, i.e. run in the proper scope and not return an error?


Never mind about the scope question--I found that simply adding the 
aemreceive bits and the custom function inside the app class resolved 
that issue, cf:

   def getDomain(domain):
         self.searchterm=domain
         self.searchfield.insert(domain)
         self.servertree.selection_set('Default')
         self.getInfo()

     installeventhandler(
         getDomain,
         'GetDmain',
         ('----', 'domain', kae.typeUnicodeText)
         )

The idea is to run the app, set a variable, "self.searchterm," then 
display the output in the app's GUI. Simple.

However, now I'm running into a separate issue. The AppleScript command 
that corresponds to the "GetDmain" event, "get domain," returns a 
strange error:

tell application "QuickWho"
	get domain "\"codebykevin.com\""
end tell

It launches the app, but returns "missing value."

I know "missing value" is an AppleScript constant, but I'm not sure what 
variable is returning empty here, which I believe is the "missing value" 
message. Any ideas?

--Kevin

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the Pythonmac-SIG mailing list