- May
- 12,621
- 152
If, during batch file execution, a plugin does
and [Shift] is/was pressed, then QueryKeyWaiting() returns 1 and GetKeystroke() subsequently blocks.
The same thing happens with INKEY (see below). If you press/release [Shift] the "INKEY /W0" doesn't return.
This could be disastrous if you think a batch file with "INKEY /W0" in it is running ... it might not be running!
Can I avoid this in either the plugin case or the batch file case? If not, is it something you can/will change?
Thanks.
Code:
if ( QueryKeyWaiting() )
{
c = GetKeystroke(0x30);
// ...
}
The same thing happens with INKEY (see below). If you press/release [Shift] the "INKEY /W0" doesn't return.
Code:
DO FOREVER
SET x=0
INKEY /W0 %%x
ECHO %_TIME Key: %x
ENDIFF
DELAY 1
ENDDO
Can I avoid this in either the plugin case or the batch file case? If not, is it something you can/will change?
Thanks.