followgeo Posted March 21, 2010 Share Posted March 21, 2010 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 Link to comment Share on other sites More sharing options...
cueclub Posted March 22, 2010 Share Posted March 22, 2010 (edited) check this out... http://www.autoitscript.com/forum/index.php?showannouncement=11&f=2 might help you with your question Edited March 22, 2010 by cueclub Link to comment Share on other sites More sharing options...
doudou Posted March 22, 2010 Share Posted March 22, 2010 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: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
followgeo Posted March 22, 2010 Author Share Posted March 22, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now