Cedri Posted June 16, 2012 Share Posted June 16, 2012 I'm trying to move my mouse around using read lines from a text file. The text file writes 12 lines of MouseGetPos co'ords and i've been trying to pair that with mouse move. So far I've gotten it to move no where but 0,0. Thoughts? expandcollapse popupGlobal $cur1 = FileReadLine($file, 1) Global $cur2 = FileReadLine($file, 2) Global $cur3 = FileReadLine($file, 3) Global $cur4 = FileReadLine($file, 4) Global $cur5 = FileReadLine($file, 5) Global $cur6 = FileReadLine($file, 6) Global $cur7 = FileReadLine($file, 7) Global $cur8 = FileReadLine($file, 8) Global $cur9 = FileReadLine($file, 9) Global $cur10 = FileReadLine($file, 10) Global $cur11 = FileReadLine($file, 11) Global $cur12 = FileReadLine($file, 12) func0() Func func0() MouseMove ($cur2, 0) sleep(300) MouseClick ("left") sleep(300) MouseMove ($cur1, 0) sleep(300) MouseClick ("left") sleep(300) MouseMove ($cur4, 0) MouseClick ("left") MouseClick ("left") sleep(300) send ("!{TAB}") sleep(300) send ("{DOWN}") sleep(300) send ("^c") sleep(300) send ("!{TAB}") sleep(300) send("^v") sleep(300) send("{ENTER}") sleep(300) $VAR = msgbox (4, "is it working?") if $VAR=6 Then func3() if $VAR=7 Then func4() $VAR=1 EndFunc Link to comment Share on other sites More sharing options...
Cedri Posted June 16, 2012 Author Share Posted June 16, 2012 Also this is the code I used to capture the mousepos. $mouse = MouseGetPos() FileWrite($file, $mouse[0]) FileWrite($file, ", ") FileWrite($file, $mouse[1] & @CRLF) Link to comment Share on other sites More sharing options...
Zedna Posted June 16, 2012 Share Posted June 16, 2012 (edited) $cur1 = FileReadLine($file, 1) $cur1 = StringSplit($cur1, ', ', 1) MouseMove ($cur1[1], $cur1[2], 0) Edited June 16, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Cedri Posted June 19, 2012 Author Share Posted June 19, 2012 Thank you very much sir. And a bit of a stupid question but for the variable the Read line will happen before the stringsplit correct? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 19, 2012 Moderators Share Posted June 19, 2012 Correct, it must read the line in before it can manipulate it. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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