Jump to content

Recommended Posts

Posted

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)

Posted

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

Posted

can you rephrase this? it is not clear what you want to do

I think he wants 1 array that takes the results from both searches.
Posted

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

Posted

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
Posted

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

I'm trying to make it so it goes for either one of the color but not both at same time.

Posted

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¬Ð԰̤ܰ)¹%

Posted

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.
Posted (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 by Oreoshakes

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...