Well bugger me ! I’ve been learning AppleScript for 18 months, banging my head with posts to this, the best AS forum and the Apple Language Guide. Only now do I start to understand variables. And, now, I can see in various posts other people trying to understand the same thing. Why on earth does AS save variable values with/inside the script ? Why does the ALG not mention such a crucial fact ? Well, now that I look at the ALG again I can see this little gem:
Only the values of properties and global variables can persist after a script is run.
Then I found this:
The value of a global variable is not reset each time a script is run, unless its initialisation statement is executed.
A typical piece of obtuse guff that didn’t seem to apply to me ! How can anything persist after a script is run (unless something is intentionally stored in a file) ?
Sorry, rant over.
Is it possible to see what variables data is stored by AS ? For example, where are they stored ? Can they be enumerated in a script ? Are there ways to prevent this behaviour in addition to controlling permissions of main.scpt of an applet ?
Many thanks to Shane Stanley who always gets to the nub of questions and devotes so much to helping drongos like yours truely.