Mac – How to run an AppleScript or shell command on Mac OS X at screen unlock

applescriptmacshell

Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.

Best Answer

ControlPlane doesn't seem to have a rule for unlocking the screen, but you could probably some other rule in its place. If you enabled locking the screen when going to sleep and put the computer to sleep instead, you could schedule an action when waking up.

Related Question