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


Click here to return to the '10.4: AirPort and System.keychain password solution' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: AirPort and System.keychain password solution
Authored by: kenbrown on Jul 12, '07 08:55:02PM
Great solution! The "whose" operator doesn't work for me with 10.4.10's Keychain Scripting (though it sure looks like it should). Here's a slightly different version that does work by using an explicit loop:
display dialog "What key?" default answer ""
set theKeyName to the text returned of the result
tell application "Keychain Scripting"
   tell keychain "System.keychain"
      set theKeyList to every key
      repeat with k in theKeyList
         if the name of k is theKeyName then
            set TheKeyValue to the password of k
         end if
      end repeat
   end tell
 end tell

set the clipboard to TheKeyValue

display dialog "Copied " & length of TheKeyValue & " chars to clipboard." with icon note buttons {"OK"} default button "OK"


[ Reply to This | # ]