I'd like to be able to use hotkeys to run scripts when the screen is locked.

I have:

^!p::Run, D:\path\to\my\script.bat

But if the computer is locked it won't run.

I'm running Win7 64.

  • 2
    As far as I know, this is a protection method from Windows, nothing AutoHotKey can do about it. Otherwise, you could run a login script while Windows is locked. – Robert Ilbrink Jun 9 '13 at 9:24
  • So there's no way I can run my script when it's locked? – pocpoc47 Jun 9 '13 at 10:07
  • No, you might want to take a look at task scheduler. – user197261 Jun 9 '13 at 11:24
  • But task scheduler run it at certain times, not when I want to – pocpoc47 Jun 9 '13 at 12:44
  • Not a solution, but the best thing I could offer is to replace Windows' Ease of access functionality with cmd.exe. You can then communicate with your script via command line, e.g. with start parameters, without having to log in. – MCL Jun 12 '13 at 18:46

AutoHotKey scripts cannot take user input, or raise GUIs while the machine is locked as a security measure. As stated in the comments, you can replace the Ease of Access program with a script or batch, and, when that is run, it can take input, etc. though this opens a potential security issue depending on the functions of your script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.