anyways Posted July 5, 2007 Share Posted July 5, 2007 (edited) like i kinda understand my error here but i dont have any idea how i can fix it :/ $notepad13 = WinGetText("click.txt - Notepad") $lines13 = StringSplit($notepad13,@crlf,1) $randomline13 = Random(1, $lines13[0], 1) clipput($lines13[$randomline13]) Do $color = PixelGetColor(clipget()) Until $color = 0xF1F1EF MouseClick("left", clipget(),1,5) sleep(500) Do $color15 = PixelGetColor(687, 962) Until $color15 = 0xF7D610 mouseclick("left",687,962,1,5) the error is obviously in the PixelGetColor(clipget()) however the file "click.txt" contains mouse position like this: expandcollapse popup481,276 481,301 481,326 481,351 481,376 481,401 481,426 481,476 481,501 481,526 481,551 481,576 481,601 481,626 481,651 481,676 481,701 481,726 481,751 481,776 481,801 481,826 481,851 481,876 481,901 903,601 903,626 903,651 903,701 903,726 903,751 903,776 903,801 903,826 903,851 903,876 903,901 so shouldnt it work :/? I kinda understand that autoit is trying to do the pixelgetcolor function before the clipget() function, how can i tell them to make the clipget then do the pixelgetcolor with the resulting mouse position Edited July 5, 2007 by anyways Link to comment Share on other sites More sharing options...
Developers Jos Posted July 5, 2007 Developers Share Posted July 5, 2007 (edited) lost why you use the Clipboard, but the real problem is that you need 2 parameters separated by a comma and not One parameter that contains a comma. Edited July 5, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
poisonkiller Posted July 5, 2007 Share Posted July 5, 2007 Your version: $notepad13 = WinGetText("click.txt - Notepad") $lines13 = StringSplit($notepad13,@crlf,1) $randomline13 = Random(1, $lines13[0], 1) clipput($lines13[$randomline13]) Do $split2 = StringSplit(clipget(), ",") $color = PixelGetColor($split2[1], $split2[2]) Until $color = 0xF1F1EF MouseClick("left", $split2[1], $split2[2],1,5) sleep(500) Do $color15 = PixelGetColor(687, 962) Until $color15 = 0xF7D610 mouseclick("left",687,962,1,5) My version: $text = FileRead("click.txt") $lines = StringSplit($text, @crlf) $random = Random(1, $lines[0], 1) $line_random = $lines[$random] Do $split = StringSplit($line_random, ",") $color = PixelGetColor($split[1], $split[2]) Until $color = 0xF1F1EF MouseClick("left", $split[1], $split[2], 1, 5) sleep(500) Do $color15 = PixelGetColor(687, 962) Until $color15 = 0xF7D610 mouseclick("left",687,962,1,5) I don't really know if it works, I don't have time to test it. Link to comment Share on other sites More sharing options...
Valuater Posted July 5, 2007 Share Posted July 5, 2007 another approach #include <file.au3> Dim $Lines If Not _FileReadToArray("Click.txt", $Lines) Then MsgBox(4096, "Error", " Error reading log to Array error:" & @error) Exit EndIf $Random = Random(1, $Lines[0], 1) $split = StringSplit($Lines[$Random], ",") Do $color = PixelGetColor($split[1], $split[2]) Until $color = 0xF1F1EF MouseClick("left", $split[1], $split[2], 1, 5) Sleep(500) Do $color15 = PixelGetColor(687, 962) Until $color15 = 0xF7D610 MouseClick("left", 687, 962, 1, 5) not tested 8) Link to comment Share on other sites More sharing options...
anyways Posted July 5, 2007 Author Share Posted July 5, 2007 (edited) wow, wtf poisonkiller, it worked thnx bro i think i shoulda just separate the clicks in 2 txt file, instead of putting the mouse position in the same txt file, that was dumb from my part edit: thx valuater too, yours shoudl also work since its almsot the same thing that wat poisonkiller said Edited July 5, 2007 by anyways 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