Help - Search - Members - Calendar
Full Version: LoadRGB with a if / then
AC Tools Everything Macro > AC Tool Macros > Macro Development
blurr
Could someone help with the syntax please.

LoadRGB 710, 712
If color = #FFFF00
Keys 8
Else if color = #FF0000
Keys 9
End

Thanks for your help.
Bear
QUOTE(blurr @ Jul 20 2009, 09:37 PM) *
Could someone help with the syntax please.

LoadRGB 710, 712
If color = #FFFF00
Keys 8
Else if color = #FF0000
Keys 9
End

Thanks for your help.


No, you need to take a reading of the location when the first condition is true, the values are stored in the global values {RGBRed}, {RGBGreen} & {RGBBlue}. then take another reading when the second condition is true.

CODE
LoadRGB X, Y
IF {RGBRed} > 75 and {RGBGreen} < 200 and {RGBBlue} = 50
  //do something if true
else
  // do this if false
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.