Re: using tell with proc. serial numb. in OS X
Re: using tell with proc. serial numb. in OS X
- Subject: Re: using tell with proc. serial numb. in OS X
- From: Christopher Nebel <email@hidden>
- Date: Wed, 14 Nov 2001 14:20:17 -0800
On Wednesday, November 14, 2001, at 02:18 AM, Neal A. Crocker wrote:
How does the Apple Event Manager support pid addresses? From the
documentation, as far as I can tell, there's a way to translate pids to
psns (in Processes.h) and addresses can be made from psns but not
pids. It's possible I missed something.
Yep -- typeKernelProcessID, in AEDataModel.h. Just create an
AEAddressDesc with the pid data and that type, and it should work.
Translating the pid to a psn isn't necessary, and wouldn't always work
in any case. (Every process has a pid, but not necessarily a psn.)
Identifying which of the process running "widgetd" to send to would
depend on the purpose for which events were being sent and which script
was sending them. [stuff about sub-launching child processes and then
sending them events...]
OK, I see your point, and I agree with the basic functionality you're
arguing for, but I think passing raw pids around is the wrong way to get
it. I'll think about it some more, though.
It would be useful if [processes] exposed all sort of useful properties
beyond pid, such as, for instance, the info Process Viewer exposes in
human readable form.
That sounds like another enhancement request. We're definitely drifting
into the realm of feature speculation here, which is not a very useful
list topic. Feel free to suggest more, but send them to
email@hidden instead.
--Chris Nebel
AppleScript Engineering