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


Click here to return to the 'Connect to servers with Applescript using Keychain' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Connect to servers with Applescript using Keychain
Authored by: thecloud on Feb 04, '05 02:12:38AM
Let's say you have a password for the AppleShare server "Foobar" saved in your keychain. You can look it up like this:
tell application "Keychain Scripting" to get password of first AppleShare key of current keychain whose server is "Foobar"

Maybe you have more than one account on "Foobar"? Maybe more than one volume or machine? No problem, just narrow your search until you find the one you want:
tell application "Keychain Scripting" to get password of first AppleShare key of current keychain whose address is "192.168.1.69" and server is "Foobar" and volume is "Mac HD" and account is "My Name"

and so on...

[ Reply to This | # ]