Diff between "set..." and "Property..."?


What’s the difference between these 2 lines of code:

set xxx to "path:to:a:folder"


Property xxx : "path:to:a:folder"

In my short scripting career, I’ve noticed they seem to do the same thing. When would one be better than the other?


A property’s value will be retained from one execution of the script to the next. I generally use them only if the value is modified by the script for use in subsequent executions.

Another difference is that properties are defined when the script is compiled - though they may be changed when it runs. ‘Set’ only happens when the script runs.