• 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: variables vrs properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variables vrs properties


  • Subject: Re: variables vrs properties
  • From: Chris Page <email@hidden>
  • Date: Tue, 11 Jan 2011 05:22:20 -0800

On Jan 6, 2011, at 7:05 AM, email@hidden wrote:

In this example, the first time you run the script you're asked to navigate to a file. Not when you compile, when you run.

Initial property values are evaluated at compile time and then stored in the properties of the compiled script, whether or not you run the script. choose file runs when I compile the script in Script Editor and asks me to select a file. If I cancel, the script is left uncompiled.

The second time you run it the values are set and you're not asked to navigate.


ES

property getStarted : (choose file)
property pathAsText : getStarted as text
on run

display dialog getStarted as text
display dialog pathAsText

set pathAsText to "Hello"
display dialog pathAsText
end run

-- 
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
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: variables vrs properties (From: Jim Brandt <email@hidden>)
 >Re: variables vrs properties (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: How to do a goto with Applescript?
  • Next by Date: Re: How to do a goto with Applescript?
  • Previous by thread: Re: variables vrs properties
  • Next by thread: Re: variables vrs properties
  • Index(es):
    • Date
    • Thread