Hi, change e=WaitEvent() to e=WaitEvent(5).
See, what's happening is that WaitEvent() waits forever for an event. Moving the mouse over the canvas causes a $203 event - and so your program proceeds. Clicking the mouse will also move the program along as that also causes an event.
WaitEvent(5) waits 5 milliseconds for an event and then proceeds regardless of whether an event happened or not. You can change 5 to whataver you want.
See, what's happening is that WaitEvent() waits forever for an event. Moving the mouse over the canvas causes a $203 event - and so your program proceeds. Clicking the mouse will also move the program along as that also causes an event.
WaitEvent(5) waits 5 milliseconds for an event and then proceeds regardless of whether an event happened or not. You can change 5 to whataver you want.