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