I have a working AHK script that I've been using for a while.
I recently tried adding a new line to this script to run a function in Transparent Screen Lock; namely, to lock the PC on a hotkey combination. According to the program's documentation:
You can lock your screen though a script by executing this program with the "/s" switch:
"Transparent Screen Lock.exe /s".
My current AHK script looks like this:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. NumpadLeft:: Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe Return NumpadUp:: Run C:\Program Files\Sublime Text 3\sublime_text.exe Return NumpadPgUp:: Run B:\Users\Me\AppData\Local\Wunderlist\Wunderlist.exe Return NumpadClear:: Run C:\Program Files\CyberGhost 6\CyberGhost.exe Return NumpadRight:: Run C:\Program Files\Adobe\Adobe Photoshop CS4 (64 Bit)\Photoshop.exe Return NumpadDown:: Run C:\Windows\System32\cmd.exe, B:\Users\Me\Desktop Return NumpadPgDn:: Run C:\cygwin64\bin\mintty.exe -, B:\Users\Me\Desktop Return #^!:: Run C:\Windows\SysWOW64\Transparent Screen Lock.exe /s Return
According to the AHK documentation,
#^! is an equivalent modifier to the CtrlWinAlt keyboard combination, so after saving and reloading the above script, pressing those keys should run the lock function in TSL-PRO. Instead, it does nothing. The other program hotkeys work as they always have.
I also tried running the script without the
/s parameter, and it still did nothing, so it appears that the modifiers may be to blame, though I'm not sure why.
What am I missing here?