Separate names with a comma.
Discussion in 'Mac Programming' started by NecroDayz, Feb 25, 2013.
Currently working on a text based AppleScript game but how would I go about making a save system?
If this is a regular AppleScript application you can store data in properties or use a preferences .plist file via defaults or the Property List Suite from System Events. For an Xcode or Cocoa-AppleScript application there is NSUserDefaults.
Have a look at NSSavePanel.
Thanks for the help I appreciate it.
That's about the insanest thing I've heard all week. Granted, it's only Monday, but still.
Ya it's pretty easy/hard at times due to it being pseudocode and it's just plain vanilla AppleScript however using .plist files how would I save/load variables
Ah, I thought you want to save a file such a text file.
You have to say "do shell script" and then something like that: defaults write com.apple.Finder AppleShowAllFiles NO
Instead of NO you can use your variable and instead of com.apple.Finder you use the name of your .plist file.
The .plist file has to be in the following directory: ~/Library/Preferences/.
I hope this helps!