09-10-2025, 07:30 PM
I have a macro that performs an incremental search in a predefined list. It starts like this:
rep
int vk=wait(5 KF)
;;processing of pressed key (adding it to the search string, finding the search string in predefined list,
;;displaying the found items via onscreendisplay, etc.
The macro works, but the problem is that when the user types too fast, not all pressed keys are registered by the vk=wait(5 KF) instruction, probably because the processing part takes longer than it takes for a fast typist to type the next keystroke.
How can I prevent this and make sure all keys pressed by the user are registered?
rep
int vk=wait(5 KF)
;;processing of pressed key (adding it to the search string, finding the search string in predefined list,
;;displaying the found items via onscreendisplay, etc.
The macro works, but the problem is that when the user types too fast, not all pressed keys are registered by the vk=wait(5 KF) instruction, probably because the processing part takes longer than it takes for a fast typist to type the next keystroke.
How can I prevent this and make sure all keys pressed by the user are registered?