A graphic is already on screen showing the meanings of the following keys: j, k, l.
At the point when that graphic appears I want my script to then wait for the user to press any of those keys. My script will respond appropriately.
I found an old post by zackrspv that led me to the following script. My question is: how can I limit keyboard input to this GUI? I don't want the user's keystrokes to be seen by any other program that might be running. I cannot figure out how to incorporate the BlockInputEX UDF into my script, plus I'm not sure my approach is even the best solution.
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$form = GUICreate("test", 500, 500,BitOR($WS_SYSMENU,$WS_POPUP))
$SBack = GUICtrlCreateDummy()
$SPause = GUICtrlCreateDummy()
$SForward = GUICtrlCreateDummy()
Dim $AccelKeys[3][2] = [["j", $SBack],["k", $SPause],["l", $SForward]]
GUISetAccelerators($AccelKeys)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $SBack
ConsoleWrite("back" & @CRLF)
Case $SPause
ConsoleWrite("pause" & @CRLF)
Case $SForward
ConsoleWrite("forward" & @CRLF)
EndSwitch
WEnd