Yesterday I Made this little example with a messagebox and a Time Out in various Seconds.. you dont need do anything its self running
' msgbox selfrunning timer
' you don't need to do anything ;)
'
uses console
declare function msgbox lib "user32.dll" alias "MessageBoxTimeoutA"(sys hwnd,string s,st,sys p,l,k) as integer
msgbox(0,"Wait 5 seconds","don't worry waiting for the five second warning",0,100,5000)
msgbox(0,"Wait 3 seconds","warning three seconds gone",0,100,3000)
msgbox(0,"Wait 1 seconds","warning finally gone",0,100,1000)
print "ends"
wait