I didn't want to add a huge library of really well written procedures to my program.
I have just finished this and about 2 weeks reading and rereading the API references on the MOUSE... (I am now cross-eyed and devoutly insane BTW!)
My solution was simple.
Code: Select all
If MouseButton(#PB_MouseButton_Left)
LBUTSTATE = GetAsyncKeyState_(#VK_LBUTTON) ; this = 32768 if PRESSED
; Debug "MOUSE STATE: "+Str(GetAsyncKeyState_(#VK_LBUTTON)) ; uncomment to see
If LBUTSTATE = -32767 ; LEFT mouse button UP = -32767 : )
; INSERT YOUR CODE HERE
EndIf
; LBUTSTATE = 0 ; not needed as I found out
EndIf