Re: Get script's folder from within the script
Re: Get script's folder from within the script
- Subject: Re: Get script's folder from within the script
- From: Michelle Steiner <email@hidden>
- Date: Sun, 27 Dec 2009 10:22:26 -0700
On Dec 27, 2009, at 9:21 AM, Nicola Vitacolonna wrote:
>> "path to me" does report the script's path within AppleScript Editor, if the script has been saved.
>
> You are right… But not in a property definition:
>
> property x : (path to me) as text
> display dialog x -- HD:Applications:Utilities:AppleScript Editor.app
Of course. By making it a property, you're locking it in to what it is when it was saved, which is the script editor. If it's not a property, it gets evaluated at run time, which returns its actual location.
What is the purpose of making it a property?
-- Michelle
--
"Never ask a man what computer he uses. If it's a Mac, he'll tell you. If it's not, why embarrass him?" --Tom Clancy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden