bvr Posted August 18, 2005 Share Posted August 18, 2005 I am having problems with getting the mouse to click the right coords that I jotted down. I am working on a "bot" for a game. I tried increasing the delays, but it still clicks the wrong places. This is my code. expandcollapse popup;----D2Portal Runner---- Func D2PortalRunner() Sleep(10000) MouseMove(110, 411) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(193, 394) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(194, 353) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(179, 447) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(218, 399) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(173, 417) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(143, 424) Sleep(2500) MouseClick("left") Sleep(5000) MouseMove(93, 99) Sleep(2500) MouseClick("left") Sleep(5000) MouseClick("left", 321, 203) EndFunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 18, 2005 Moderators Share Posted August 18, 2005 First, waiting after your MouseMove for a period of time, could change the coords of your mouse position if your mouse get's bumped or something. Looks like you would be safer just doing MouseClicks: Also... Try Adding Opt("MouseCoordMode", 0) Opt("MouseCoordMode", 0) ;----D2Portal Runner---- Func D2PortalRunner() Sleep(10000) MouseClick("left", 110, 411, 1, 1) Sleep(5000) MouseClick("left", 193, 394, 1, 1) Sleep(5000) MouseClick("left", 194, 353, 1, 1) Sleep(5000) MouseClick("left", 179, 447, 1, 1) Sleep(5000) MouseClick("left", 218, 399, 1, 1) Sleep(5000) MouseClick("left", 173, 417, 1, 1) Sleep(5000) MouseClick("left", 143, 424, 1, 1) Sleep(5000) MouseClick("left", 93, 99, 1, 1) Sleep(5000) MouseClick("left", 321, 203, 1, 1) EndFunc Good Luck 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 More sharing options...
bvr Posted August 18, 2005 Author Share Posted August 18, 2005 thanks, its working better. 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