Re: Get path to script in Panther
Re: Get path to script in Panther
- Subject: Re: Get path to script in Panther
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 29 Jan 2004 21:10:48 -0800
On 1/29/04 7:20 PM, "Gnarlodious" <email@hidden> wrote:
>
How does one get the path to the current script in Panther? My scripts no
>
longer work with "path to me" because now that returns the path to the host
>
application which in this case is "CoreServices:SystemEvents".
>
>
I hesitate to hard code all the paths, am I missing something?
'path to me' has _always_ returned the path to the application running the
script. If you put it into an applet (script application) you'll get the
path to the script just fine. If you run it in a script editor, you'll get
the path to the script editor (unless you have Script Debugger and choose
the pref to to have it return the path to the script document or app). If
you run it in the Entourage script menu, you'll get the path to Entourage.
And so if you run it from the system Script menu, which is operated by
System Events, you'll get the path to System Events. (In OS 10.1 it was
"SystemUIServer".)
It would be nice if the script menu did whatever SD does to return the real
path, for sure. OSA menu in OS 8 could do it too.
--
Paul Berkowitz
_______________________________________________
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.