Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: numlock keytoggleget
My WIL batch file looks like this:
;------------------------------------- While KeyToggleGet(@NUMLOCK) == @OFF WinTitle(``, `Thinks NUMLOCK OFF`) Delay(1) EndWhile Message(``, `Detected NUMLOCK ON`) ;-------------------------------------Steps to Repeat Problem:
As soon as the WIL Interpreter goes from an ICON to a NORMAL window, the NUMLOCK state change is detected.
Is there a work-around, possibly involving a Windows API call?
In 32 bit Windows, each application can have its own view of the status of the toggles, so you can only really see and set your own view. Consequently, WinBatch cannot necessarily detect the Key Toggle for a specific application, or read that view for the KeyToggleSet.
On DOS based systems, like 16-bit Windows, this function will return the keys state for ALL applications.
Article ID: W13094
Filename: KeyToggleGet and Problem Detecting Key Toggle.txt
File Created: 1999:04:15:16:51:42
Last Updated: 1999:04:15:16:51:42