• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Path to me Caveat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Path to me Caveat
      • From: JJ <email@hidden>
    • Re: Path to me Caveat
      • From: Timothy Bates <email@hidden>
  • Prev by Date: Re: Desktop window - size versus bounds
  • Next by Date: last call for assistance...
  • Previous by thread: Re: Desktop window - size versus bounds
  • Next by thread: Re: Path to me Caveat
  • Index(es):
    • Date
    • Thread