[Pythonmac-SIG] Applevents to running applications..

Just van Rossum just@letterror.com
Wed, 15 Jul 1998 20:44:53 +0200


At 7:08 PM +0200 7/15/98, Th. Fettig wrote:
>I am doing a workflow-component using Python as 'steering' and
>interface to our database, and would need to talk to various
>Applescripts i wrote (saved as application..) via the default
>handlers (run,open,save,quit). Has anybody done this yet? I looked
>around for a while, but only found facilities to use converted
>Dictionaries.. which is totally dependent on signatures, but these
>do not differ for Applescripts!!
>Sending Events is also possible via PSN (process serial numbers), so
>before i start coding C, i wonder if there's a way to get the PSN in
>Python and use the AE-module to construct and handle events directed
>to the running processes. Is this possible? Any examples available?

(I'm not too familiar with Bill Bedfords PythonScript module so I don't
know if it helps, but do check it out, it's in :Mac:Contrib: PythonScript)

As far as I know there is no interface to the Process Manager yet.
If you *know* how to do it in C, and you don't need 68k support, consider
Jack's Most Wonderful calldll module (in the standard distr).
You can make Python crash just like with C, but you'll still be done
quicker. See :Mac:Demo:calldll: for some examples, and search the archives
of this list for "MicroSeconds", for a bad and a good example of what it
can do with Toolbox calls.

Just