Re: Determining path to script
Re: Determining path to script
- Subject: Re: Determining path to script
- From: Lachlan Deck <email@hidden>
- Date: Thu, 4 Mar 2004 00:02:43 +1100
Hi Chris,
On Wednesday, March 3, 2004, at 10:48 AM, Christopher Nebel wrote:
On Mar 2, 2004, at 12:16 PM, Chap Harrison wrote:
How do I make a script find out its own path? ...
OK, general question here: why do people want to do this? The usual
reason, as far as I can tell, is to get at "support files" for the
script -- data, templates, script libraries, and so on.
That's probably true.
What other reasons do people have?
A second reason, and closely related, would be so that a script, if
working with said data, templates, etc, will work *without
modification* in any given location (which is especially helpful for a
library of scripts that are possibly interdependent [e.g., via load
script]). Shell scripts, for e.g., allow this kind of freedom without
such a 'property' needing to be hand-coded.
So it's really a case of hand-coding versus dynamic assignment which is
obviously a preferable choice.
If you could use application bundles [1] in a coherent fashion, would
that solve your problem?
That would solve one type of problem - a lone script that has private
data.
It seems to me however that this feature is most certainly one of other
chickens which may be hatched from the basic functionality described
above (i.e., /bin/pwd like knowledge). This is the egg.
--Chris Nebel
AppleScript Engineering
with regards,
--
Lachlan Deck
email@hidden
_______________________________________________
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.