Even if you are very fast clicking the mouse, GLBasic might be faster so you can get mouse-down for two or more frames. This you need to keep track of yourself in your code.
This is the code I am using:
FUNCTION KeyHitUpdate:
GLOBAL b1State, b2State // Will contain 0=not pressed, 2=just pressed, -1=released, 1=mouse is down
STATIC b1Down, b2Down
MOUSESTATE mx, my, b1, b2
IF b1
IF b1Down
b1State=1
ELSE
b1Down = 1
b1State = 2
ENDIF
ELSE
IF b1Down
b1Down = 0
b1State = -1
ELSE
b1State = 0
ENDIF
ENDIF
IF b2
IF b2Down
b2State=1
ELSE
b2Down = 1
b2State = 2
ENDIF
ELSE
IF b2Down
b2Down = 0
b2State = -1
ELSE
b2State = 0
ENDIF
ENDIF
ENDFUNCTION
Usage:
//Game loop
WHILE TRUE
KeyHitUpdate() // Always first in the loop
PRINT "Mouse-State:" + b1State, 100,100
IF b1State=2
INC tips, 1
PRINT "Click!", 100, 120
ENDIF
IF b1State=-1
PRINT "Release", 100, 120
ENDIF
PRINT "Tipps"+tips, 100, 140
HIBERNATE // Just for the example so it doesn't run so fast
SHOWSCREEN
WEND