Jump to content

bradacc

Members
  • Posts

    4
  • Joined

  • Last visited

bradacc's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Awesome!! Thanks a ton. It worked like a champ.
  2. If I get rid of the second sets of colors it comes back fine, but I want it either color choice at each position to be OK. I think brackets or parentheses', but I can't figure it out. While $i <=10 $pixel1 = PixelGetColor(691, $scany1) $pixel2 = PixelGetColor(714, $scany2) $pixel3 = PixelGetColor(718, $scany2) If $pixel1 = 0xDAA258 Or 0xD9A055 And $pixel2 = 0xD18B2F Or 0xD18C30 And $pixel3 = 0xD18B2F Or 0xD18C30 Then $foundy1 = $scany1 $foundy2 = $scany2 ToolTip("Found at position " & $i,0,0) Sleep(1000) ToolTip("") ExitLoop Else $scany1 += 14 $scany2 += 14 $i += 1 EndIf WEnd Thanks in advance for any and all replies.
  3. Awesome! That looks way cleaner, thank you. It would be "Or" instead of the "And". I am looking for a name(in orange), if I find that name then I can continue with the script. If the name isn't where I thought it should be I will search in a different area. I just couldn't think of how I should do an If statement with multiple positives. Thanks to your help I know now. CHEERS!
  4. Greetings everyone, I have done several searches in the help file, and on the internet, but could still use your help. I would like to check 6 different positions for a color(say 0xD79C4E), and if they are what I want then continue the script, if not then do something else. So what I'm thinking is instead of looking for a positive outcome of the color in the window, look for the absence of it, kind of like so: $pixel1 = PixelGetColor(1, 1) $pixel2 = PixelGetColor(2, 2) $pixel3 = PixelGetColor(3, 3) $pixel4 = PixelGetColor(4, 4) $pixel5 = PixelGetColor(5, 5) $pixel6 = PixelGetColor(6, 6) If $pixel1 = 0xFFFFFF Then; If it's white then search failed Exit ElseIf $pixel2 = 0xFFFFFF Then; If it's white then search failed Exit ElseIf $pixel3 = 0xFFFFFF Then; If it's white then search failed Exit ElseIf $pixel4 = 0xFFFFFF Then; If it's white then search failed Exit ElseIf $pixel5 = 0xFFFFFF Then; If it's white then search failed Exit ElseIf $pixel6 = 0xFFFFFF Then; If it's white then search failed Exit Else Do something here;Something other than white background at all positions, so carry on. Would this be the cleanest way to code it, or is there a better way? Thank you in advance for any and all replies. EDIT: I know the code isn't totally kosher, but I just wanted to get the idea across.
×
×
  • Create New...