Re: [Pyobjc-dev] Python as an AppleScript Replacement?
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@or...> - 2003-03-02 20:04:46
|
Taking this over to pythonmac-sig too, in the hope someone knows the solution. On zondag, maa 2, 2003, at 10:29 Europe/Amsterdam, Donovan Preston wrote: [talking about gensuitemodule] > 1) It currently asks you to select an application with a Carbon file > picker. The Carbon file picker exposed by python requires a > type/creator mask, and won't let you pick application bundles. > > 2) It currently opens the resource fork of the application you chose > and reads the binary data off disk, which it then parses to discover > the english names and corresponding four character codes. > > The solution to these problems is to instead send the 'ascr' 'gdte' > event directly to the application you wish to create a python module > for, by addressing the application's four character code. I would love to do this in gensuitemodule, but there's bits and pieces I don't know. Maybe someone can enlighten me? 1. Where is the ascr/gdte described? What is the return value, just raw AEUT/AETE data, or is it somehow encoded in OSA objects? 2. It appears there's a higher level interface too, because if I do "get dictionary" in the script editor some applications are indeed fired up, but some are not. So, it seems that sometimes the ascr/gdte event is used to get the dictionary, but sometimes it's grabbed from the resource fork. At least, it seems that way... 3. Is there an API to get the "pick application" dialog that script editor puts up when you do a get dictionary? The way it seems to find scriptable applications all over the place I get the impression it works together with launch services or something... -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - |