Restored from previous forum. Originally posted by PB.
> How to programmatically fire an event so that WaitWindowEvent automatically is executed?
To do what, exactly? From your example, it looks like you want to loop something
over and over until the close gadget on your window is clicked... is that right?
And using WaitWindowEvent is pausing your loop? If this is your problem, then
use WindowEvent instead of WaitWindowEvent, and put a tiny 1 millisecond delay
in to prevent the loop from using up 100% of your PC's CPU. Like this:
Code: Select all
Repeat
Sleep_(1) ; To prevent 100% CPU usage (important!).
EventID=WindowEvent() ; Check if an event just happened.
;
; Loop code goes here.
;
Until EventID=#PB_EventCloseWindow
PB - Registered PureBasic Coder