Sign in to follow this  
Followers 0
followgeo

Mouse not clicking on coordinates

4 posts in this topic

Ok, yeah so you've heard it before.. another newb trying autoit.

I've been paying attention and the help file has become my friend. I've also been searching alot on the forums and have learned a bunch.

I'm making a bot for a game I play which will remain unmentioned. I have a gui working where it grabs the mouse coordinates and displays them in a msgbox for me for testing. I then set a button to click the same coordinates when pressed and then a message box pops up to confirm the coordinates again for me. Like I said, just learning and trying to learn by testing. The problem is when I click the button that mimics clicking my coordinates the mouse just goes to the top of the screen. I've set the mousecoordmode to 1 so that it is relative to the screen. The mouseclick function I'm using is below.

Not asking for the code, but can someone point me in the right direction. Is there a mode setting I'm missing? Not sure where to look next.

func testit()
    mouseclick("left", $xcapture & "," & $ycapture,1)
    msgbox(0,"coordinates:", $xcapture & "," & $ycapture)
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

check this out...

http://www.autoitscript.com/forum/index.php?showannouncement=11&f=2

might help you with your question :(

Edited by cueclub

Share this post


Link to post
Share on other sites

Despite cueclub's very reasonable point about game-bots, your func is just wrong, try this:

Func testit()
    mouseclick("left", $xcapture, $ycapture, 1)
    msgbox(0,"coordinates:", $xcapture & "," & $ycapture)
EndFunc

UDFS & Apps:


DDEML.au3 - DDE Client + Server[*]
Localization.au3- localize your scripts[*]
TLI.au3 - type information on COM objects (TLBINF emulation)[*]
TLBAutoEnum.au3 - auto-import of COM constants (enums)[*]
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector

- OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE 

Share this post


Link to post
Share on other sites

Despite cueclub's very reasonable point about game-bots, your func is just wrong, try this:

Func testit()
    mouseclick("left", $xcapture, $ycapture, 1)
    msgbox(0,"coordinates:", $xcapture & "," & $ycapture)
EndFunc

Thanks for the warning. I figured naming a specific game could be a problem so I did not. Thanks for correcting my function! Like I said, just starting and was trying to tinker.

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