Re: osascript - path to me
Re: osascript - path to me
- Subject: Re: osascript - path to me
- From: Timothy Bates <email@hidden>
- Date: Tue, 21 May 2002 09:51:10 +1000
- .mxoez?+: O?W^h1]g}IB\WO2A=6#`2^rL?jAu,r8EcKz@UG.r.7[$&Ym;j8^Wp;/KAlcda MO/$} $"[ c?\#d@cuN
- 9+kli1>@: KaeEcbn$EIG)tY@^[7y`lyrI<4S(cnqzmTD&4<tTkuNR(4dweN}SUlDX/X^c>"
>
On Monday, May 20, 2002, at 05:10 AM, Dennis W. Manasco wrote:
>
> Maybe I'm missing something but...
>
> It makes no sense for 'me' to refer to anything other than the entity
>
> asking the question.
Paul replied
>
Ah, but who is the entity asking the question? Per the ASLG the
>
script executing the 'me' command is the entity. This has nothing to do
>
with any file system.
Absolutely. Then what should me do when it is asked for the path to
itself?The last thing I would do when asked for the path to myself is give
the address of the person running me (script editor).
>
> It makes no more sense for 'path to me' to return the path to the
>
> program executing the script than it does for 'path to me' to return,
>
> "The computer in Bob's room."
>
>
Suppose you wanted to quit all applications. So you make a script
>
that gets all the processes and repeats through them quitting them. But,
>
you don't want the script to kill itself until it has killed the other
>
processes. Now which process is the script running in? How else could
>
you know that it is the System:library:CoreServices:SystemUIServer.app
>
that is running the script if 'path to me' doesn't tell you? (In the
>
case of a script running from the scripts menu.)
This is the one time you need the path to the thing doing the running.
But, in this one case, you do not want the path to me, you ant the path to
the object executing me. So we should be able to say
path to executor of me
And get back either my path (if I am an applet) or the path of Entourage, or
Script Editor, or whomever is running me.
Tim
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.