From: Daniel A. S. <st...@ic...> - 2002-03-06 13:01:09
|
At 17:19 -0800 on 5/3/02, Jim Ingham wrote: >Yeah, this is something the Finder does. But I don't think that >this is what assigns the PSN, it is just passing it to the process. >So what you would really need to do is get Tcl to register with the >WindowServer. Somebody sent some code to do this - I think to the >list - but I can't find it now... found some excellent commented sample code by Steve Zeller explaining how to do AE from cli tools http://radio.weblogs.com/0100012/2002/01/17.html One important note is that AEDaemonClient includes a workaround for a bug in the 10.0 and 10.1 AppleEvent managers, whereby a command line tool must supply its own reply port if it is expecting a reply from an AEMessageSend call. he only links with ApplicationServices.frameworks and uses AESendMessage: // Now send the event - we use AESendMessage (in <AE/AEMach.h>) because we don't have // access to AESend() which is in <AE/AEInteraction.h> and exported from Carbon.framework. // That was done because AESend involves high level event handling and filter procs. we should probably do the same in tclAE, to avoid having to link with Cabon.framework. he also uses typeKernelProcessID to address the AE to a process identified by unix pid Cheers, Daniel -- ** Daniel A. Steffen ** "And now to something completely ** Department of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |