Re: Keychain Scripting
Re: Keychain Scripting
- Subject: Re: Keychain Scripting
- From: Jeffrey Mattox <email@hidden>
- Date: Fri, 13 Dec 2002 12:35:52 -0600
Has anyone had success in OS X Keychain Scripting? I'm trying to get a
servername and password,etc and don't know where to start. Nothing seems to
work.
Hope that makes sense . . .
-- Rachel
I'm a newbie, but, but I figured this much out. It should get you
started in the right direction. This works in AppleScript Studio.
tell application "Keychain Scripting"
--get current keychain
set theName to ((name of current keychain) as string)
unlock current keychain
-- scan through the keys
set theKeyList to get keys of current keychain
set theIndex to 1
repeat with theKey in theKeyList
set theName to name of key theIndex of current keychain as string
set theAccount to (account of key theIndex of current
keychain as string)
set theDesc to description of key theIndex of current
keychain as string
set theService to service of key theIndex of current
keychain as string
display dialog "n:" & theName & " a:" & theAccount & " d:"
& theDesc & " s:" & theService
set theIndex to theIndex + 1
end repeat
end tell
As usual, some of those line pairs should be all one line.
Jeff
_______________________________________________
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.