AutoIt documentation of operations states, for the '=' operator,
= Tests if two values are equal. e.g. If $var= 5 Then (true if $var equals 5). Case insensitive when used with strings.
However, I have found that when the value to compare to is 0, all string values compare as equal to 0.
For example,
If("Foo" = 0) Then MsgBox(1, "Result", "Apparently, Foo = 0")
Also true for >= and <=
This behavior does not occur with the '==' operator.
Local $a="Foo", $b=0, $res="" If("Foo" = 0) Then $res&="Apparently Foo = 0"&@CRLF If ($a = $b) Then $res&="Apparently "&$a&" = "&$b&@CRLF If ($a == $b) Then $res&="Apparently "&$a&" == "&$b&@CRLF If ($a <= $b) Then $res&="Apparently "&$a&" <= "&$b&@CRLF If ($a >= $b) Then $res&="Apparently "&$a&" >= "&$b&@CRLF If ($a < $b) Then $res&="Apparently "&$a&" < "&$b&@CRLF If ($a > $b) Then $res&="Apparently "&$a&" > "&$b&@CRLF $b=1 If ($a = $b) Then $res&="Apparently "&$a&" = "&$b&@CRLF If ($a == $b) Then $res&="Apparently "&$a&" == "&$b&@CRLF MsgBox(1, "Results", $res)