I love it !! That's exactly what I would do !
On Nov 5, 6:50 pm, Glenn <[EMAIL PROTECTED]> wrote: > First of all, I'd highly recommend defining constants for you numerical > values that you are testing against. It makes it easier if you ever change > those values and also prevents against typos if you use those values > elsewhere in your code. > > Secondly, try a case statement. Do the processing you want if it equals the > desired values, then utilize a "default" case which will contain the > processing if it doesn't equal any of your desired values. > > ...Glenn > > > > On Wed, Nov 5, 2008 at 3:15 AM, Gotrek65 <[EMAIL PROTECTED]> wrote: > > > I'm experimenting with a program called AutoIT and the language is > > very similar to VB.net which I've taken several classes about. > > I'm trying to incorporate a decimal PixelGetColor result with a if > > then statement. Heres what I have so far. > > > sleep(2000) > > $cargo = PixelGetColor( 1629 , 896 ) > > If $cargo = 6981005 then > > MsgBox(0,"Cargohold Status","empty.") > > elseif $cargo =12549944 then > > Msgbox(0,"Cargohold Status","full.") > > ElseIf $cargo <> 12549944 or 6981005 then > > msgbox(0,"WTF?", $cargo) > > EndIf > > > There are only two general colors that should show on this pixel an > > orangeish color or silver/white but through out the macro the shading > > of the pixel changes. > > > I'm not sure how to do a "Elseif $cargo doesn't=12549944 or 6981005 > > then" or Is there a way to do a "Elseif $cargo = 12000000-12999999 > > then" > > > Thanks- Hide quoted text - > > - Show quoted text -
