Brendan Simon (eTRIX) wrote: >> I've no idea if there's anything you need to watch for when Apple events >> in a wxPython-based application, so you might need to do a bit of >> research on that front. The basic code for handling a GetURL event >> should go something like this: >> >> from Carbon import AE >> from Carbon.AppleEvents import * >> >> >> def geturl(requestevent, replyevent): # event handler >> desc = requestevent.AEGetParamDesc(keyDirectObject, typeUTF8Text) >> url = desc.data.decode('utf8') >> # do stuff with URL here... >> >> AE.AEInstallEventHandler(kAEInternetSuite, kAEISGetURL, __geturl) >> >> Studying the argvemulation.py module's implementation may also be >> informative. > > I had a look at argv_emulation.py and it seems to have most of this > stuff already. It handles OpenApplication and OpenDocuments Apple > Events. Guess the 'proper' thing to do would be to extend > argv_emulation.py to handle the IsGetURL event as described above. > > I will give it a go and post the results.
I registered the __geturl() event handler but it never gets called. How can I determine if the events are being sent to MyApp ?? I tried: $ export AEDebugSends=1; export AEDebugReceives=1 $ open myapp:xyz Obviously some event is causing MyApp to open when I type "open myapp:xyz", but does that actually mean MyApp will receive the event or just some internal framework that causes the application to be launched ?? Thanks, Brendan.
begin:vcard fn:Brendan Simon n:Simon;Brendan org:eTRIX pty ltd adr:;;PO Box 306;St Kilda;VIC;3182;Australia email;internet:brendan.si...@etrix.com.au title:Managing Director tel;work:+61-417-380-984 tel;cell:+61-417-380-984 x-mozilla-html:TRUE version:2.1 end:vcard
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig