Re: Where am I?
Re: Where am I?
- Subject: Re: Where am I?
- From: Sander Tekelenburg <email@hidden>
- Date: Sun, 1 Apr 2001 09:48:24 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 15:48 +1000 UTC, on 01/04/2001, Nick Quinn wrote:
>
[...] Some of my scrips are a bit mobile and get tested on one machine then
>
used on another. Instead of hard-coding the path to the folder they work
>
on, I
>
would like simply to put the script in that folder and let it do something
>
like:
>
>
set pathToScript to the path of this script
set pathToScript to path to me
>
Then fiddle with the text to get the folder path.
tell application "Finder"
set pathToScript to container of (path to me)
end tell
Note 1) "me" is only the script itself if it is an applet, not when you run
it in for instance Script Editor.
Note 2) the second script's result is of a different class then the first
script's. Whether that matters will depend on what you're trying to do - you
may have to coerce it to a different class.
HTH
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBOsbdNusywKfXgqKdEQJT8ACfbpcTmmb26eoxIRUa4Ub+e5o2yPwAn1Lg
WCW5EyzuMkptlvhHzy0+Rvnk
=ne+z
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
mailto:email@hidden>
Web site at <
http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"
References: | |
| >Where am I? (From: Nick Quinn <email@hidden>) |