Re: [Q] Get the folder the script is located in
Re: [Q] Get the folder the script is located in
- Subject: Re: [Q] Get the folder the script is located in
- From: Michelle Steiner <email@hidden>
- Date: Thu, 14 Sep 2006 08:23:34 -0700
On Sep 14, 2006, at 8:02 AM, Eric Gorr wrote:
tell application "Finder" to set c to container of (path to me)
That does not work for scripts that are run from Script Editor; it
returns the path to the script editor, and not to the script file.
It does work if the script is saved as an application or if the
script is run from the script menu.
Is there any more general way of doing it so this would work as well?
I don't know. I do have to add, though, that before Tiger, running
it from the script menu would return the path to the current
application, and not to the script file. So we have had one step
forward. Maybe Leopard will fix the remaining problem.
At least one of the third-party script editors (Smile) returns the
location of the script, even when run from the editor. So using
Smile instead of Script Editor will solve this problem for you right
now. And Smile is free.
-- Michelle
--
Whoever said the last man standing is the winner didn't invite the girl.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden