Re: sending Apple events between users (Pause iTunes of different user, redux)
Re: sending Apple events between users (Pause iTunes of different user, redux)
- Subject: Re: sending Apple events between users (Pause iTunes of different user, redux)
- From: Matt Neuburg <email@hidden>
- Date: Tue, 01 Feb 2005 08:58:59 -0800
On Sat, 29 Jan 2005 11:20:23 -0800, Matt Neuburg <email@hidden> said:
>> eppc://zellers:email@hidden/Finder?uid=501&pid=315
>
>So in theory, by specifying the uid, I should be able to specify not just a
>particular machine (which could be the machine I'm already on) but a
>particular user from amongst those who are currently logged onto that
>machine. Thus, I should be able to send Apple events between users on the
>same machine, or to one particular user on a remote machine.
>
>Now, this may or may not work when sending a raw Apple event, but I have
>*never* gotten it to work from AppleScript (which is why I don't mention it
>in my book). AppleScript always (a) munges the specifier rather badly, and
>(b) targets one particular user. For example, if both user 501 and user 502
>are logged in, and each has a window open in the Finder, then no matter what
>I do, when I ask Finder for the name of window 1 using the above syntax, I
>always get the name of the window open in one particular user - it is a
>total crap shoot whether this will be the active console user or the hidden
>user, but whichever it is, I cannot, on that occasion, find a way to get the
>other user.
>
>* Does it work when sending raw Apple events, even if it does not work in
>AppleScript?
Thanks to Hamish Sanderson's idea of using Python, it was easy to test this
quickly, and the answer is: no, it doesn't work there either. The remote
machine persisted in giving me information about whatever logged-in user it
felt like, regardless of what uid=xxx value I supplied. So clearly the
problem is in the underlying Apple Events Manager mechanism; this feature
(the ability to send AEs to a particular user when multiple users are logged
in at once) simply does not work as advertised. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden