I have a script with two subroutines: A and B. I want A to run if I launch the .ahk script regularly (by double clicking its icon). and I want B to run if I launch the .ahk script while a button (say, Ctrl) is held down (while double clicking the icon). Is this possible?
I have a script with two subroutines: A and B . I want A
Share
It’s not possible to detect if a key was pressed before the script started, but you can use GetKeyState to check if a key is in the “pressed” state when the script starts: