• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keychain Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Keychain Scripting
      • From: Gnarlodious <email@hidden>
References: 
 >Keychain Scripting (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: How to check applications already opened
  • Next by Date: Re: Keychain Scripting
  • Previous by thread: Keychain Scripting
  • Next by thread: Re: Keychain Scripting
  • Index(es):
    • Date
    • Thread