Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another option (store password in keychain)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another option (store password in keychain)
Authored by: sjonke on Apr 21, '04 02:38:16PM
this applescript code will retrieve a password from the Keychain:
		tell application "Keychain Scripting"
			tell keychain 1
				unlock
				set theKey to first key whose name is "Some Password"
				set theUsername to (account of theKey) as string
				set thePassword to (password of theKey) as string
			end tell
		end tell
Use the Keychain Access application to create a new password with the name you chose ("Some Password" in the example). The "unlock" command will request your keychain password if the keychain is locked. If the keychain is already locked it won't ask.

---
--- What?

[ Reply to This | # ]