[Pythonmac-SIG] items vs. documents in Safari suite
Donovan Preston
dp at ulaluma.com
Mon Feb 2 16:19:48 EST 2004
On Feb 2, 2004, at 2:58 PM, Mark Eichin wrote:
> 4) Is there a trick to figuring out the raw event operations that a
> given chunk of AppleScript produces? I can find lots of
> AppleScript examples, and if I could take something like
> "repeat with i from 1 to the count of documents"
> and figure out what it was really doing, it would be a lot easier
> to come up with python equivalents. Maybe some kind of AppleEvent
> tracer, or disassembler?
set the following environment variables in a shell:
AEDebug 1
AEDebugSends 1
AEDebugReceives 1
Adjust to taste depending on what you want to see. Then run the app
which you expect to be sending and receiving AEs. ScriptEditor or your
python script using pythonw:
/Applications/AppleScript/Script\ Editor.app/Contents/MacOS/Script\
Editor
or:
pythonw myscript.py
I used to use Lasso Capture AE on Mac OS 9 to do a similar thing where
I would trigger some events which did whatever I was trying to do in
script editor, watch the output, and then try to reproduce it using
python code. It has been helpful.
dp
More information about the Pythonmac-SIG
mailing list