For example, here: https://www.autohotkey.com/docs/commands/FileReadLine.htm
Code: Select all
if ErrorLevel
Code: Select all
if ErrorLevel != 0
Code: Select all
if ErrorLevel
Code: Select all
if ErrorLevel != 0
Well, actually that seems pretty consistent with the general handling of boolean values in AHK (and similar to a number of other programming languages, btw):
https://www.autohotkey.com/docs/Variables.htm#Expressions wrote:Boolean values: When an expression is required to evaluate to true or false (such as an IF-statement), a blank or zero result is considered false and all other results are considered true. For example, the statement if ItemCount would be false only if ItemCount is blank or 0. Similarly, the expression if not ItemCount would yield the opposite result.