On the example below was wondering why I get a flip
count only when I move the mouse, I can wait 20 seconds
move the mose barely and the count increments by 10
obviously due to the mod 10 statment. My question is
if I make no mouse movement isn't the main code still
continuously looping ? Thanks,
-------------------------------------------------------
'This function will be automatically called every Flip
Function MyHook:Object( id,data:Object,context:Object )
Global count
count:+1
If count Mod 10=0 Print "Flips="+count
End Function
'Add our hook to the system
AddHook FlipHook,MyHook
'Some simple graphics
Graphics 640,480,0
While Not KeyHit( KEY_ESCAPE )
Cls
DrawText MouseX()+","+MouseY(),0,0
Flip
Wend
count only when I move the mouse, I can wait 20 seconds
move the mose barely and the count increments by 10
obviously due to the mod 10 statment. My question is
if I make no mouse movement isn't the main code still
continuously looping ? Thanks,
-------------------------------------------------------
'This function will be automatically called every Flip
Function MyHook:Object( id,data:Object,context:Object )
Global count
count:+1
If count Mod 10=0 Print "Flips="+count
End Function
'Add our hook to the system
AddHook FlipHook,MyHook
'Some simple graphics
Graphics 640,480,0
While Not KeyHit( KEY_ESCAPE )
Cls
DrawText MouseX()+","+MouseY(),0,0
Flip
Wend