Lock computer when a device is disconnected

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
chenhoulin6204
Posts: 1
Joined: 06 Aug 2018, 19:48

Lock computer when a device is disconnected

12 Aug 2018, 20:18

Hello, I'm new to AutoHotkey and I'm totally clueless.

What I want to achieve is, to lock the computer when a certain device is disconnected.

I tried using 'OnMessage', but the only function related is 'WM_DEVICECHANGE = 0x219'.

If I use that, you can't specify which device triggers the action, also a new connection will also count. I want a certain device's disconnect to trigger the action, that is locking my computer. Is that achievable?

Any help is greatly appreciated... thanks a lot in advance everyone.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], Nerafius and 217 guests