Keychain Access ... contains?
Keychain Access ... contains?
- Subject: Keychain Access ... contains?
- From: Brian Gist <email@hidden>
- Date: Mon, 7 Feb 2005 02:52:40 -0700
Hi there. I have been working on a keychain access script (Script
Editor 1.9) which will get the name and or password of a key ...
because I have hundreds of keys and sometimes I cannot go through and
find the one I'm looking for by hand. Of course, I don't then
remember or even know the full name of the actual key.
So here is the script I have running:
tell application "Keychain Scripting"
set k to (get key 1 of keychain "brian" whose name is "mail.mac.com")
tell k to set L to {name, account, password}
end tell
L
However, this version, which is infinately more useful, doesn't work.
tell application "Keychain Scripting"
set k to (get key 1 of keychain "brian" whose name contains "mac.com")
tell k to set L to {name, account, password}
end tell
L
Any ideas how to implement a "contains" clause in keychain scripting,
without having the infinate loop ...
I had tried this version as well ... but it is far too slow to be useful.
tell application "keychain scripting"
set keyList to (get every key from keychain "brian")
repeat from x to (length of keyList)
if item x of keyList contains "mac.com" then
set keyNames to keyNames & item x of keyList
set x to x + 1
end if
end repeat
end tell
Any ideas? Thanks,
Brian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden