Hi,
How can I flush keyboard buffer before testing @CODE - FLUSHKEYS does not work. The same problem is with flush buffer for pressing buttons.
If I press button very quicky more times then I get more result - but I need to control it and get only one.
Thanks
			
			
			
				If you want to flush GUI related messages, try the following FlushMessages function, and apply the additional condition with g_IgnoreMessages, where you want to apply the flush:
$include "windowssdk.inc"
' helper global variable
BOOL g_IgnoreMessages
sub FlushMessages()
	MSG msg
	g_IgnoreMessages = TRUE
	while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
		DispatchMessage(&msg)
	wend
	g_IgnoreMessages = FALSE
endsub
sub window_handler(),int
	select @MESSAGE
		case @IDCONTROL
			if (!g_IgnoreMessages)
				' TODO: handle controls
			endif
	endselect
	return 0
endsub