Unlock trigger

Hi there easy way to trigger a macro on screen unlock?

(I tried the combo from Any suggestions on how to trigger a macro upon unlocking the screen?, but it doesn't always work, because the Screen Lock might be engaged manually and not through the screensaver.)

I created a macro to lock the computer and assigned it the same hotkey ^⌘Q

This macro would log me out of Lastpass, but the main thing was to set the variable, enable the "App Activation on Screen Unlock" macro, and then put the system to sleep. The "App Activation on Screen Unlock" macro would use the Disable Macro step to disable itself.

I mainly did this for the Lastpass Mac application, but then Lastpass dropped support for the Safari version and that does not work as well for regular applications. So I have had this disabled and am not sure if it behaves the same with Catalina.

Hope this helps.

Mark

Hi @halloleo, maybe if you get this:

a little bit for you?

Mmmmh, I do not want to change my unlock procedure - I just want to attach a script to the event when the screen gets unlocked...

1 Like

Me too. For example I’d want to connect via my VPN on unlock.

I ended up using another tool: EventScripts by Mousedown. It's a small MenuBar app which can trigger scripts on Screen unlock and many other events.

I have setup some Applescripts which are triggered by Eventscripts' Screen unlock and Screen wake events. The Applescripts in turn call KM macros which do the actual work I need to be done (toggling a Target Mode on another iMac).

Works pretty well. :slight_smile: