Oreoshakes Posted August 9, 2007 Share Posted August 9, 2007 what do i put in place of $searchresult to make it use both searches. $SearchResult1 = PixelSearch(252,196,768,487,$TargetG,5,3) $SearchResult2 = PixelSearch(252,196,768,487,$TargetW,5,3) If @error <> 1 Then MouseClick($Click, $SearchResult[0]+15, $SearchResult[1]+45, 7, 3) Link to comment Share on other sites More sharing options...
DW1 Posted August 9, 2007 Share Posted August 9, 2007 can you rephrase this? it is not clear what you want to do AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 Trying to get this to use more than one color. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") HotKeySet('{esc}', '_Exit') ;Hotkey escape Dim $Coord, $Click, $TargetG, $TargetW, $SearchResult1, $SearchResult2 $TargetG = 0x5B9600 $TargetW = 0xC4C1C4 $TargetR = 0xCD4800 $Click = "Right" While 1 = 1 Sleep(100) $SearchResult1 = PixelSearch(252,196,768,487,$TargetG,5,3) $SearchResult2 = PixelSearch(252,196,768,487,$TargetW,5,3) If @error <> 1 Then MouseClick($Click, $SearchResult1[0]+15, $SearchResult1[1]+45, 7, 3) Send("{F1}") Send("{F3}") if isarray $SearchResult1 = PixelSearch(237,193,806,638,$TargetG,5,1) Then endif if isarray $SearchResult2 = PixelSearch(237,193,806,638,$TargetW,5,1) Then endif Send("{Right}") $SearchResult1 = PixelSearch(342,342,1000,342,$TargetG,5,3) $SearchResult2 = PixelSearch(342,342,1000,342,$TargetW,5,3) if @error <> 1 then MouseClick($Click, isarray[0]+15, isarray[1]+45, 7, 3) Send("{F1}") Send("{F3}") if isarray $SearchResult1 = PixelSearch(237,193,806,638,$TargetG,5,1) Then EndIf if isarray $SearchResult2 = PixelSearch(237,193,806,638,$TargetW,5,1) Then EndIf WEnd Func _Exit() Exit EndFunc While 1 Sleep(5*60*1000) Send("{F3}") WEnd Link to comment Share on other sites More sharing options...
Paulie Posted August 9, 2007 Share Posted August 9, 2007 can you rephrase this? it is not clear what you want to doI think he wants 1 array that takes the results from both searches. Link to comment Share on other sites More sharing options...
DW1 Posted August 9, 2007 Share Posted August 9, 2007 so you want it to click on two different colors? or only if the first one isn't there click the second? is there priority? we need more information... sorry for not understanding AutoIt3 Online Help Link to comment Share on other sites More sharing options...
DW1 Posted August 9, 2007 Share Posted August 9, 2007 I think he wants 1 array that takes the results from both searches.If that is the case, you can just redim one of the arrays and put the other array at the end of the one you just redim'ed AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 If that is the case, you can just redim one of the arrays and put the other array at the end of the one you just redim'edI'm trying to make it so it goes for either one of the color but not both at same time. Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 Or maybe just the one thats closest. Link to comment Share on other sites More sharing options...
DW1 Posted August 9, 2007 Share Posted August 9, 2007 maybe turning this:$SearchResult1 = PixelSearch(252,196,768,487,$TargetG,5,3) $SearchResult2 = PixelSearch(252,196,768,487,$TargetW,5,3)oÝ÷ Ú)í¡©Þ²×!ü(ºWp¢¹¢·±jjey«¢+ØÀÌØíMÉ¡IÍÕ±ÐÄôA¥á±MÉ ÈÔÈ°ÄäØ°ÜØà°ÐàÜ°ÀÌØíQÉѰ԰̤)%ÉɽȱÐìÐìÄQ¡¸)5½ÕÍ ±¥¬ ÀÌØí ±¥¬°ÀÌØíMÉ¡IÍÕ±ÐÅlÁt¬ÄÔ°ÀÌØíMÉ¡IÍÕ±ÐÅlÅt¬Ð԰̤ܰ)±Í(ÀÌØíMÉ¡IÍÕ±ÐÈôA¥á±MÉ ÈÔÈ°ÄäØ°ÜØà°ÐàÜ°ÀÌØíQÉѰ԰̤)%ÉɽȱÐìÐìÄQ¡¸5½ÕÍ ±¥¬ ÀÌØí ±¥¬°ÀÌØíMÉ¡IÍÕ±ÐÅlÁt¬ÄÔ°ÀÌØíMÉ¡IÍÕ±ÐÅlÅt¬Ð԰̤ܰ)¹% AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 maybe turning this:$SearchResult1 = PixelSearch(252,196,768,487,$TargetG,5,3) $SearchResult2 = PixelSearch(252,196,768,487,$TargetW,5,3)oÝ÷ Ú)í¡©Þ²×!ü(ºWp¢¹¢·±jjey«¢+ØÀÌØíMÉ¡IÍÕ±ÐÄôA¥á±MÉ ÈÔÈ°ÄäØ°ÜØà°ÐàÜ°ÀÌØíQÉѰ԰̤)%ÉɽȱÐìÐìÄQ¡¸)5½ÕÍ ±¥¬ ÀÌØí ±¥¬°ÀÌØíMÉ¡IÍÕ±ÐÅlÁt¬ÄÔ°ÀÌØíMÉ¡IÍÕ±ÐÅlÅt¬Ð԰̤ܰ)±Í(ÀÌØíMÉ¡IÍÕ±ÐÈôA¥á±MÉ ÈÔÈ°ÄäØ°ÜØà°ÐàÜ°ÀÌØíQÉѰ԰̤)%ÉɽȱÐìÐìÄQ¡¸5½ÕÍ ±¥¬ ÀÌØí ±¥¬°ÀÌØíMÉ¡IÍÕ±ÐÅlÁt¬ÄÔ°ÀÌØíMÉ¡IÍÕ±ÐÅlÅt¬Ð԰̤ܰ)¹% I'll see if it works. Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 (edited) Now I'm getting error "WEnd" with no "While" statement. This could just be because there is an error between the two right? Sorry I'm a total noob at this I've been doing this same script for days. While 1 = 1 Sleep(100) $SearchResult1 = PixelSearch(252,196,768,487,$TargetG,5,3) If @error <> 1 Then MouseClick($Click, $SearchResult1[0]+15, $SearchResult1[1]+45, 7, 3) Else $SearchResult2 = PixelSearch(252,196,768,487,$TargetW,5,3) If @error <> 1 then MouseClick($Click, $SearchResult2[0]+15, $SearchResult2[1]+45, 7, 3) Send("{F1}") Send("{F3}") if $SearchResult1 = PixelSearch(237,193,806,638,$TargetG,5,1) Then if $SearchResult2 = PixelSearch(237,193,806,638,$TargetW,5,1) Then Send("{Right}") $SearchResult1 = PixelSearch(342,342,1000,342,$TargetG,5,3 if @error <> 1 then MouseClick($Click, $SearchResult1[0]+15, $SearchResult1[1]+45, 7, 3) Else $SearchResult2 = PixelSearch(342,342,1000,342,$TargetW,5,3) If @error <> 1 then MouseClick($Click, $SearchResult2[0]+15, $SearchResult2[1]+45, 7, 3) Send("{F1}") Send("{F3}") if $SearchResult1 = PixelSearch(237,193,806,638,$TargetG,5,1) Then Send("{F1}") Send("{F3}") else if $SearchResult2 = PixelSearch(237,193,806,638,$TargetW,5,1) Then Send("{F1}") Send("{F3}") Wend Func _Exit() Exit EndFunc Edited August 9, 2007 by Oreoshakes Link to comment Share on other sites More sharing options...
DW1 Posted August 9, 2007 Share Posted August 9, 2007 Post the code that errors AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Oreoshakes Posted August 9, 2007 Author Share Posted August 9, 2007 I don't know I might have set this up completely wrong lol 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