sumkid Posted September 6, 2007 Share Posted September 6, 2007 (edited) well this is my code: Sleep(2000) HotKeySet("{ESC}","qt") While 1 $c=PixelSearch(405,265,875,580,(hidden due to use)) If IsArray($c) Then MouseMove($c[0],$c[1],0) If IsArray($c) Then MouseClick("right") If IsArray($c) Then Sleep (1000) If IsArray($c) Then MouseMove (38,177) If IsArray($c) Then MouseClick("right") If IsArray($c) Then MouseMove (33,217) If IsArray($c) Then MouseClick("right") If IsArray($c) Then Send ("{1}") WEnd Func qt() Exit EndFunc what i want to do is add multiple searches that will do the same thing so i can search for about 3 different pixel colors instead of one. what i have been doing is making more codes with different pixels but it makes major lag. please help? anyone! PS: the reason i hid the pixel was because of what im using the code for is private sorry Edited September 6, 2007 by sumkid Link to comment Share on other sites More sharing options...
therks Posted September 6, 2007 Share Posted September 6, 2007 (edited) Okay, give this a try. This will search for one colour, if it doesn't find it, searches for the next one, then the next one, etc. If it does find it, it does all the clicking and moving and stuff. Local $colors[3] = [ 0xff0000, 0x00ff00, 0x0000ff ] Sleep(2000) HotKeySet("{ESC}","qt") While 1 For $i = 0 To 2 $c=PixelSearch(405,265,875,580,$colors[$i]) If IsArray($c) Then MouseMove($c[0],$c[1],0) MouseClick("right") Sleep (1000) MouseMove (38,177) MouseClick("right") MouseMove (33,217) MouseClick("right") Send ("{1}") ExitLoop EndIf Next WEnd Func qt() Exit EndFunc Edited September 6, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
sumkid Posted September 6, 2007 Author Share Posted September 6, 2007 (edited) umm what im looking for is a way to search more pixels that will do the same functions whitch would be: If IsArray($c) Then MouseMove($c[0],$c[1],0) MouseClick("right") Sleep (1000) MouseMove (38,177) MouseClick("right") MouseMove (33,217) MouseClick("right") Send ("{1}") i want it to keep doing that except with more pixels then 1 so i dont have to run multiple programs Edited September 6, 2007 by sumkid Link to comment Share on other sites More sharing options...
therks Posted September 7, 2007 Share Posted September 7, 2007 Oh, okay, then just take my example above and remove the ExitLoop. I think that might do what you're looking for. My AutoIt Stuff | My Github 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