how would i go about implementing, reading, and saving user preferences?
all i need to save is some popup box values.
thanks!
how would i go about implementing, reading, and saving user preferences?
all i need to save is some popup box values.
thanks!
You’ll want to use the user defaults system. It’s a built-in feature of ASStudio and OSX, and is very easy to use. I find it is beneficial to assign your app identifier from the beginning, so you know where to find your plist file and so you don’t end up creating many copies with different names. Your identifier is something like “com.jobu.myApp”, where your plist file would be saved as “com.jobu.myApp.plist”. You can set it in “Targets > MyApp >>> Info.plist Entries > Basic Information” in the “Groups & Files” list. Check in “/Users//Library/Preferences/” to see what preference identifiers are typically structured like and what the file contents will end up looking like. The code to access them and write them in ASS is very easy and requires little effort on your part.
For starters, take a look at these threads, found searching the ASStudio forum for “user defaults”, all terms…
→ [url=http://bbs.applescript.net/viewtopic.php?t=8971]http://bbs.applescript.net/viewtopic.php?t=8971[/url]
→ [url=http://bbs.applescript.net/viewtopic.php?t=8067]http://bbs.applescript.net/viewtopic.php?t=8067[/url]
→ [url=http://bbs.applescript.net/viewtopic.php?t=4348]http://bbs.applescript.net/viewtopic.php?t=4348[/url]
→ [url=http://bbs.applescript.net/viewtopic.php?t=4992]http://bbs.applescript.net/viewtopic.php?t=4992[/url]
Good luck,
j