Re: Getting values from keychain
Re: Getting values from keychain
- Subject: Re: Getting values from keychain
- From: Gnarlodious <email@hidden>
- Date: Thu, 13 May 2004 16:23:26 -0600
This works for me:
tell application "Keychain Scripting"
unlock current keychain
set theAccount to account of AppleShare key 1 of current keychain
set theServer to server of AppleShare key 1 of current keychain
set theVolume to volume of AppleShare key 1 of current keychain
set thePassword to password of AppleShare key 1 of current keychain
end tell
You can specify other kinds of keys besides AppleShare .
-- Gnarlie
Entity Isaac Ordonez spoke thus:
>
Hello all,
>
>
I'm trying to get some values from the keychain and enable them to be
>
used through out a script. I figured that doing
>
>
on keychain(myvalue)
>
try
>
tell application "Keychain Scripting"
>
tell keychain 1
>
unlock
>
set theKey to first key whose name is "Add User Info"
>
set myvalue to (myvalue of theKey) as string
>
>
end tell
>
end tell
>
end try
>
end keychain
>
>
>
property importname : my keychain("password")
>
property importpass : my keychain("account")
>
property myServer : my keychain("server")
>
>
>
on clicked theObject
>
display dialog "Password:" & importpass & " User:" & importname & "
>
Server:" & myServer & ""
>
end clicked
>
>
would be close to right but I keep getting errors. Anyone see what I'm
>
doing wrong?
>
>
Isaac Ordonez
>
Technology Support Specialist II
>
San Rafael City Schools
>
415.302.8114
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.