• 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
Re: Get script's folder from within the script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Get script's folder from within the script (From: Nicola Vitacolonna <email@hidden>)

  • Prev by Date: Re: Get script's folder from within the script
  • Next by Date: Re: Get script's folder from within the script
  • Previous by thread: Re: Get script's folder from within the script
  • Next by thread: Re: Get script's folder from within the script
  • Index(es):
    • Date
    • Thread