Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Save user-defaults (first post)



Hello and thanks ahead of time to anyone who can help.
I have been playing with applescript for years but only recently tried Applescript studio.
I have a simple application made that will backup files from the desktop and documents folder to a folder on the users 10.3 server users folder.


They have to enter the ip address and username and password in a text field on the window.
I would like for the ip address and username to be saved and remain when they launch the program again.


I've looked at the Archive Maker example and can't seem to move the concepts from it to my program.

Does someone have a very basic example that will store the text entered in the text fields on subsequent uses of the program.

Any help appreciated.

I am using only one script in the application with simple variable names like ipnumb, userpw, and usern

on should quit after last window closed theObject
tell user defaults
make new default entry at end of default entries with properties {name:"ipnumber", contents:ipnumb}
register
end tell
quit
end should quit after last window closed


on opened theObject
	tell user defaults
		set ipnumb to contents of default entry "ipnumber"
	end tell
end opened
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.