So, here's the deal. I've copied an applescript seen here:
http://safari.oreilly.com/1565928415/aplscptian-CHP-12
The script is:
tell application "Keychain Scripting" to lock
I was hoping to add this to a quicksilver trigger to lock my 1Password keychain whenever I needed to.
(I've tried the other method mentioned at O'Reilly;
tell application "Keychain Scripting"
if (not locked of keychain "1Password") then
lock keychain "1Password"
end if
end tell
but I get an applescript error "Cant make locked of «class ckc » "MyPasses" of application "Keychain Scripting" into type boolean"
)
The first script I mentioned works half the time, but ONLY if the 'login' keychain is unlocked. If it's already locked, and I run the script, then none of the other keychains will be locked, but if it's unlocked and I run the script, then the login keychain will lock.
Slightly strange behaviour, and I'm hoping someone here can shed some light on the situation, or come up with a better solution.
I've added the keychain icon to the menu bar to lock the keychain from there, but I'd prefer a trigger / keyboard shortcut.
Thanks
http://safari.oreilly.com/1565928415/aplscptian-CHP-12
The script is:
tell application "Keychain Scripting" to lock
I was hoping to add this to a quicksilver trigger to lock my 1Password keychain whenever I needed to.
(I've tried the other method mentioned at O'Reilly;
tell application "Keychain Scripting"
if (not locked of keychain "1Password") then
lock keychain "1Password"
end if
end tell
but I get an applescript error "Cant make locked of «class ckc » "MyPasses" of application "Keychain Scripting" into type boolean"
)
The first script I mentioned works half the time, but ONLY if the 'login' keychain is unlocked. If it's already locked, and I run the script, then none of the other keychains will be locked, but if it's unlocked and I run the script, then the login keychain will lock.
Slightly strange behaviour, and I'm hoping someone here can shed some light on the situation, or come up with a better solution.
I've added the keychain icon to the menu bar to lock the keychain from there, but I'd prefer a trigger / keyboard shortcut.
Thanks