Re: Path to me Caveat
Re: Path to me Caveat
- Subject: Re: Path to me Caveat
- From: Timothy Bates <email@hidden>
- Date: Fri, 12 Oct 2001 17:46:26 +1000
It is 10 45 pm: do you know where your children are?
On 12/10/01 7:54 AM, "Paul Skinner" <email@hidden> wrote:
>
It has been posted repeatedly that '(path to me)' will return the path
>
to the script that is running the command or the environment that it is
>
running in.
>
In most instances this is true, but if you use the parent property in
>
your script this is not the case. I don't expect that many scripters use
>
this property, but if you do, don't expect the 'path to' to tell you where
>
the child's script file is.
>
>
--begin script
>
--running in an editor or an an applet.
>
property parent : application "Finder"
>
display dialog ((path to me) as text)
>
-->"OS9:System Folder:Finder"
>
--end script
>
>
In these cases, I have no idea how to find the script's location from
>
within itself. Maybe somebody here will show me how.
Dr Timothy Bates <
mailto:email@hidden>
Macquarie Centre for Cognitive Science (MACCS)
Macquarie University
Ph 61 (2) 9850 8623
Fx 61 (2) 9850 6059