I want to write an AppleScript to search my keychain for keys whose name matches a certain pattern, and change their passwords. I’m having trouble because Keychain Scripting refuses to work properly - even when I give it something simple to match on, it’s failing.
Even this dies:
tell application “Keychain Scripting”
set myKey to (first Internet key of current keychain whose name starts with “a”)
end tell
It comes back with a Scripting Error: ‘Keychain Scripting got an error: Can’t get Internet key 1 of current keychain whose name starts with “a”.’
I don’t understand why this is happening. (Yes, I do have keychains whose names begin with ‘a’.) I even tried using a third-party library out there called “Usable Keychain Scripting”, but I wasn’t able to figure out how to get that to work at all.
Does anyone have any ideas on this, or would someone please give me or point me at a script that can find and manipulate keys on a keychain?
Model: G5
AppleScript: Latest
Browser: Safari
Operating System: Mac OS X (10.5)