|
|
#1 |
|
Save System in AppleScript
Currently working on a text based AppleScript game but how would I go about making a save system?
|
|
|
|
0
|
|
|
#2 |
|
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.
__________________
MacBook Pro / OS X Mountain Lion (10.8.3) / Xcode 4.6 / [various (much) older stuff keeping dust off the shelves] |
|
|
|
0
|
|
|
#3 |
|
Have a look at NSSavePanel.
__________________
MacBook Pro Core 2 Duo, Mac Mini 2011, iPhone 4, My website |
|
|
|
0
|
|
|
#4 |
|
Thanks for the help I appreciate it.
|
|
|
|
0
|
|
|
#5 |
|
|
0
|
|
|
#6 |
|
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
|
|
|
|
0
|
|
|
#7 |
|
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!
__________________
MacBook Pro Core 2 Duo, Mac Mini 2011, iPhone 4, My website Last edited by Gugulino; Feb 26, 2013 at 08:45 AM. |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 03:37 AM.







Linear Mode
