PDA

View Full Version : applescript to lock computer




kevindosi
Nov 30, 2007, 04:29 AM
I used to use sizzlingkeys, which had a nice option to make a shortcut that would "lock" the computer. None of my applications would close, but it would send me to the login window where I'd have to type in my password to get back to the computer. I recently switched to coversutra which, along with quicksilver, is a lot more functional. I still miss that shortcut to lock the computer, though. Does anyone know where I can get an applescript to achieve this? Then I could just set a quicksilver trigger to run the applescript. Any help would be greatly appreciated, thanks!



motulist
Nov 30, 2007, 04:30 AM
Just make the screen saver set to require password to end the screen saver and then set the screen saver to a hot key.

edit: I just checked and I didn't see an option to require password when waking from screensaver in 10.3.9. I don't know if that changed or not. Oh well, it was a good try.

MikeSel
Apr 21, 2010, 11:03 AM
I know this is a really old post, but it comes up nearly first in Google results so I figured it would be a good place to post my findings.

I have put together a tutorial on how to use a shell script in automator on OS X to do this very thing :)

http://www.mikesel.info/click-lock-your-mac/

Hope this helps :)