WinMatchKeys
(Engine-Level Function)
Description: | Returns true if the specified keyboard keys have been pressed in the sequence given, in another window. |
Returns: | Boolean |
Usage: ![]() |
Steady State only. |
Function Groups: | Keyboard |
Related to: | MatchKeys |
Format: ![]() |
WinMatchKeys(Object, Enable, Keys) |
Parameters: |
Object |
Required. Any expression which gives the object value of any module instance which is running in the window. |
Enable |
Required. Any numeric expression giving an enable for the function. Testing of keyboard input is enabled when this parameter is true (not 0). If this parameter is false(0), the function's value is false(0). In addition, the Enable parameter controls the type of comparison done. If the Enable is 1, a case-sensitive match is made. If the Enable is 2, then the match is not case-sensitive. (Any non-zero value other than 2 will cause a case-sensitive match. The use of 1 and 2 is recommended for clarity.) |
Keys |
Required. A text expression giving the key sequence to watch for. The case of individual letters may be significant, depending on the Enable parameter. For example: PageUp = Concat(MakeBuff(1, 253), MakeBuff(1, 0x49)); F2 = Concat(MakeBuff(1,253), MakeBuff(1,60)); F3 = Concat(MakeBuff(1,253), MakeBuff(1,61)); CtrlZKey = MakeBuff(1, 26); |
Comments: |
The Object is used to determine which window to watch for the keystrokes in.
|
Example:
If WinMatchKeys(secondaryWin, 2, "go"); [ ... ]
This statement will wait until the window designated by secondaryWin is active and then will further wait until the keys "go" (in any case, upper or lower) is entered at the keyboard. At that point the function will return true and the script will execute.