PDA

View Full Version : Save variables in AppleScript?




JasonZ
Aug 28, 2010, 06:14 PM
Is it possible to save changes made to a variable from run to run? For example have a certain set of code only run the first time you execute the script?



angelwatt
Aug 28, 2010, 09:25 PM
Write them to a file and read them back at the beginning of the run.

larkost
Aug 28, 2010, 10:30 PM
AppleScript technically has something that will do it: OSAStore and OSALoad, but I would recommend relying on this and read/write this in a more conventional way from a file.

JasonZ
Aug 28, 2010, 11:28 PM
Im sorry but im lost... I have no idea how to do what either of you suggested... :confused:

angelwatt
Aug 29, 2010, 07:38 AM
Im sorry but im lost... I have no idea how to do what either of you suggested... :confused:

Then Google for "applescript save open file"