Path to me Caveat
Path to me Caveat
- Subject: Path to me Caveat
- From: Paul Skinner <email@hidden>
- Date: Thu, 11 Oct 2001 17:54:45 -0400
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.
--
Paul Skinner