Normally you use
If MouseClick() = 1 when you want to detect a mouse click with
MouseX() and
MouseY() for the mouse pointer's X and Y position.
You can also use:
+ Code SnippetDo
Mx=MouseX(): My=MouseY(): Mc=MouseClick()
If Mx>10 And My>10 And Mx<100 And My<100 And Mc=1
Rem Do Something
Endif
Sync
Loop
Using this method, you simply do:
+ Code SnippetMx=50: My=50: Mc=1
If Mx>10 And My>10 And Mx<100 And My<100 And Mc=1
Rem Do Something
Endif
.. and the If..Then will be called exactly the same as if you had clicked the mouse button when the mouse pointer was at 50,50.
TDK_Man