WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: archimede on June 29, 2022, 03:49:27 AM

Title: WaitForKeyEx(...) no works well
Post by: archimede on June 29, 2022, 03:49:27 AM
I made this test program:
WaitForKeyEx ( "A,!A", -1 )
sTest = "True"
but it works ONLY when I press "A"; it no works when I press Alt + A
The WaitForKeyEx(...) manual tell:
...
To enter an Alt, Control, or Shift key combination, precede the desired character with one or more of the following symbols:
Alt !
Control ^
Shift +
Title: Re: WaitForKeyEx(...) no works well
Post by: ChuckC on June 29, 2022, 04:11:33 AM
Re-read the help text for WaitForKeyEx().

Quote
Syntax:
WaitForKeyEx (keycodes, timeout)

Parameters:
(s) keycodes a tab-delimited list of up to 100 keys to wait for. See WaitForKey for a list of key codes.

(i) timeout the number of seconds to wait before returning.

Title: Re: WaitForKeyEx(...) no works well
Post by: kdmoyers on June 29, 2022, 05:44:18 AM
The key bit there is it's a tab delimited list, like
Code (winbatch) Select
"A":@tab:"!A"