; Is pix1 active?
$pix1 = PixelSearch(9,28,1021,780,0x8B0E45,0)
If (@error) Then
MouseClick("left", 918, 742, 1, 10)
Sleep(5000)
EndIf
; Is pix2 active?
$pix2 = PixelSearch(9,28,1021,780,0x04B466,2)
If (@error) Then
$pix3 = PixelSearch(574,567,591,583,0x960B07,0)
MouseClick (Here is where I run into issues, because pix3 can be located ANYWHERE within the coordinates. I need this to be able to click on that pixel and left click it and move it to 516,402). I just have no clue how to get MouseClick to search everywhere for that pixel rather than specific coordinates. There will be multiple locations with that pixel, Its just when pix2 is no longer active i need it to search for pix3 and once again move it to the specified location.
Sleep(5000)
EndIf