$4001 is the timer event, and x = CreateTimer (50) will generate such an event every 1/50th of a second. Use Select WaitEvent () / Case $4001 to get the timer events, and then Select EventSource () / Case x to find the timer that created it, eg.
The docs for WaitEvent give a list of event values...
http://www.blitzbasic.com/bpdocs/command.php?name=waitevent&ref=goto
timer1 = CreateTimer (50) timer2 = CreateTimer (500) Select WaitEvent () Case $4001 Select EventSource () ; Could be EventData, can't remember off-hand! Case timer1 ; Do something every 50 ms... Case timer2 ; Do something every 500 ms... ; Etc...
The docs for WaitEvent give a list of event values...
http://www.blitzbasic.com/bpdocs/command.php?name=waitevent&ref=goto