Jump to content

MouseClick without MouseMove?


Recommended Posts

  • Moderators

Hi!

Is it possible to send a mouse click to a x/y-coord, an ID etc without having to move the actual mouse cursor?

The MouseClick() function moves the mouse pointer.

Yes it's called ControlClick()

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I'm not sure you readed whole help. Try this:

MouseClick("left",0,0)

Of course, replace "0,0" with your x and y coordinates.

You can look for coords at AutoIt Window info

i542

P.S. I'm from Croatia, and my English is very bad...

Edited by i542

I can do signature me.

Link to comment
Share on other sites

I'm not sure you readed whole help. Try this:

MouseClick("left",0,0)

Of course, replace "0,0" with your x and y coordinates.

You can look for coords at AutoIt Window info

i542

P.S. I'm from Croatia, and my English is very bad...

Hi, MouseClick() actually moves the pointer to the given x/y-coord, then clicks and leave the mouse pointer.
Link to comment
Share on other sites

Yeah i was wondering the same thing, but for some reason i can't get it to work. Could someone post a sample so i can learn off of it?

I'm trying to double click on a exe file in a folder, but it won't double click it. It just sits in the folder then closes.

heres my code;

WinSetState("D2jsp","", @SW_RESTORE);restores open folder


WinActivate("D2jsp");waits till d2jsp folder is open

ControlFocus("D2jsp", "autod2jsp",1);puts focus on the area where the .exe is
sleep(2000)

ControlClick("D2jsp", "autod2jsp", 2); click the .exe
Edited by acidfear
Link to comment
Share on other sites

Yeah i was wondering the same thing, but for some reason i can't get it to work. Could someone post a sample so i can learn off of it?

I'm trying to double click on a exe file in a folder, but it won't double click it. It just sits in the folder then closes.

heres my code;

WinSetState("D2jsp","", @SW_RESTORE);restores open folder
WinActivate("D2jsp");waits till d2jsp folder is open

ControlFocus("D2jsp", "autod2jsp",1);puts focus on the area where the .exe is
sleep(2000)

ControlClick("D2jsp", "autod2jsp", 2); click the .exe
Honestly, do you really need a BOT for a BOT? :D (D2jsp is a Baal-Bot for d2 in case no one knew)

Anyway control click is definatley what you want to look into, however, there is no x/y coords to define, cause you can just click on the controls. MUCH more reliable than mouseclick too

Link to comment
Share on other sites

Well i don't need it lol. But i'm doing it to practice "Control click". I want to make my own pindle bot or something, just for practice.

The problem is, i can't get controlclick to work. Could someone help with the code?

Link to comment
Share on other sites

Hi, MouseClick() actually moves the pointer to the given x/y-coord, then clicks and leave the mouse pointer.

What here isn't okay? You want mouse pointer stays in control? :D

I can do signature me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...