In
general, instead of
you use
Because if an error occurred, your code wouldn't be executing!
In all seriousness, if your code handled the case where ErrorLevel indicates an error occurred, usually you would replace it with try-catch (and can do so in v1 as well).
However, there are some cases where ErrorLevel was
misused to return a value, rather than reporting an error. ClipWait is one of those. In those cases, you now use the return value like you would any other function.
Errorlevel := !ClipWait(ClipWaitTimeout)
If (ErrorLevel == 0)
This is a bad suggestion, even if it is the result of machine translation. If you are going to use a variable, use a more appropriate name.
As per the
example in the documentation, you can just use
ClipWait(ClipWaitTimeout) directly in the
if statement. The example uses !Clipwait() because to detect when the function times out, but to replace
If (ErrorLevel == 0), you can just use
If ClipWait(ClipWaitTimeout).
This difference of behaviour is also specifically documented under
Changes from v1.1.