Using Preference Files w/AppleScript Studio

simX

Unofficial Mac Genius
For my application, I need to save just a few things in preferences; I have set up a preference window that has two check boxes and a text field. I want to save the state of the two checkboxes and the contents of the text field in a preference file (in the appropriate folder -- the Preferences folder inside the Library folder of the User's home directory).

Is there any way to do this with just AppleScript?

Thanks for any help you can give me. :)
 
Well, I know how to do it in Obj-C, maybe you can transfer it to ASS, or just use the Obj-C version :)

It's NSUserDefaults, so it would be like this in C:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]

[defaults setObject:<blah> forKey:<blah>];

I don't remember the set pref off the top of my head, but it's pretty easy, look in the NSUserDefaults help file...
I'm pretty useless with ASS, as I much prefer Obj-C :)
 
Back
Top