Miliardsto Posted March 24, 2018 Share Posted March 24, 2018 Checkout this why "OR" not works thats my code Global $color[2] = [0xE74747,0xE94747] Func Refresh() $StartConst[0] = $Start[0] ; reset value While $StartConst[0] <> $End[0] Local $i $i += 10 $StartConst[0] += 17 $col = PixelGetColor($StartConst[0], $StartConst[1], $Title) ; get color ;For $t = 0 to 2 ; <- i know it could be done in for loop but it not works in my program If $col <> $color[0] Then ; <- why this not works Global $NowVal = $i ; GUICtrlSetData($m_actual, $NowVal) ; ExitLoop EndIf ;Next WEnd EndFunc I want to check 2 colors without for loop but this below not works . it checks only first value why? If $col <> $color[0] Or $col <> $color[1] Then ; <- why this not works Link to comment Share on other sites More sharing options...
Developers Jos Posted March 24, 2018 Developers Share Posted March 24, 2018 What do you expect from that If other that it is always true? Do you want to test whether the $col is not equal to either color and want an AND condition? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Bilgus Posted March 24, 2018 Share Posted March 24, 2018 (edited) that should be an AND if you want OR it needs to be ;And if $col <> $Color[0] AND $col <> $Color[1] Then ;Or if Not ($col = $Color[0] OR $col = $Color[1]) Then Edited March 24, 2018 by Bilgus Miliardsto 1 Link to comment Share on other sites More sharing options...
Miliardsto Posted March 24, 2018 Author Share Posted March 24, 2018 oshiet thanks xd Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now