Sign in to follow this  
Followers 0
Siiig

Moving Mouse, And Clicking.

6 posts in this topic

Hello, I was wondering if you guys could give me a hand.

Well im looking to make a script that moves the mouse to a certin place, then click the spot. What i have so far is these too commands.

MouseMove()

MouseClick()

Now i have two questiong, first, do i need anything after MouseClick()? (im looking for a left click). Also, how would i find the screen positions for MouseMove() and what format to they need to be in?

Share this post


Link to post
Share on other sites



Dude,

First try acctually reading the help file. :lmao: Not to sound like an jerk, but if you can't follow the help file for that, you should just hang it up now. There's even examples in it... :P

Good Luck!

Share this post


Link to post
Share on other sites

Sorry bout that, i actualy DIDNT read the text file for once, i feel like a jackass now :P, Sorry for the unneed post, and the lesson here is, ALAWAYS READ THE HELP FILE!!

Share this post


Link to post
Share on other sites

After you read the help file you might just use MouseClick since it can move the mouse before the click.

As for finding the coordinates - look at the windows info tool that comes with the standard AutoIt install.

Start > Programs > AutoIt v3 > AutoIt Window Info

Be sure to explore the settings under "Options".

Another way to find the coordinates is to use a little script like this:

AutoItSetOption("MouseCoordMode", 1)
AutoItSetOption("TrayIconDebug", 1)

HotKeySet("{PAUSE}", "Terminate")

While 1
    $pos = MouseGetPos()
    ToolTip("Desktop X: " & $pos[0] & ", " & "Desktop Y: " & $pos[1] & " Pause2exit")
    Sleep(10)
WEnd

Func Terminate()
    ClipPut('MouseClick("left",' & $pos[0] & ',' & $pos[1] & ',1,1); wrt DESKTOP')
    Exit
EndFunc  ;==>Terminate
Run the code above and see what you get.

[it was copied from someone else in the forum...]


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

auto-it has a "Autoit Window Info" program, that automaticaly tells you the co-ords of your mouse, aswell as other info.... lol very easy and idiot-proof

Share this post


Link to post
Share on other sites

auto-it has a "Autoit Window Info" program, that automaticaly tells you the co-ords of your mouse, aswell as other info.... lol very easy and idiot-proof

I think that I mentioned that:

As for finding the coordinates - look at the windows info tool that comes with the standard AutoIt install.

Start > Programs > AutoIt v3 > AutoIt Window Info

Be sure to explore the settings under "Options".

...but I would say the there are several idiots (including me) that did not discover the "Coord Mode" on the first day of use and that messed me up for a while.

...besides, the code in my other post writes the line of code for you. :-)

One improvement on that code would be to display all 3 "Coord Modes" with a different hotkey for each.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
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
Sign in to follow this  
Followers 0