Posted: 12th Jun 2007 2:41
Is there an way to make a program "click" the mouse by itself. Liek you can move a mouse with a program but how do you make to the mouse actually click.
Posted: 12th Jun 2007 2:56
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 Snippet
Do
  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 Snippet
Mx=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
Posted: 12th Jun 2007 7:32
No TDK, I believe he's asking how to make an autoclicker program so he can get lots of cash in WoW or something lame.
Posted: 12th Jun 2007 17:54
yes dark coder thats what im saying, an autoclicker, but not for that purpose.
Ps does anyone know do the same thing but with the keyboard. so a program can press a key.
Posted: 12th Jun 2007 23:03
...I knew this had been answered before:

http://forum.thegamecreators.com/?m=forum_view&t=58087&b=1

Check out ZioNz's post.

I'm sure if you search msdn long enough you could find a similar user32.dll function for the keyboard.

-Xol