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


Click here to return to the 'Use Keychain Scripting to autocomplete certain logins' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Keychain Scripting to autocomplete certain logins
Authored by: leenoble_uk on Nov 30, '05 07:47:18AM

I realised as soon as I submitted this that I had got bogged down in UI Scripting at one stage and the part which requires it is completely unnecessary. This piece of script stops UI Scripting being necessary if you want it to auto-submit:


do JavaScript "document.forms['" & theFormName & "'].submit();" in document 1

Place that after the other do Javascript lines if you want to avoid hitting return afterwards.

Also, I don't think you'd need a different keychain for each login. You can just add another key and adjust the script to use key 2 or something I'm sure. You could go one stage further and add a choice popup asking which key to use, though you might have to hardcode their names so you know what key 1 and key 2 are.

---
Brought to you by S C Johnson, a family multinational conglomerate.

[ Reply to This | # ]

Use Keychain Scripting to autocomplete certain logins
Authored by: thecloud on Nov 30, '05 12:00:12PM

You can look up a particular key in a keychain with a "whose" clause.

For example:
set theKey to first key of the current keychain whose server is "My Server"

You can narrow the search by combining attributes:
set theKey to first key of keychain "login.keychain" whose name is "www.macosxhints.com" and account is "thecloud"



[ Reply to This | # ]