- ...
- Timeout
Type: Integer or Float
How many seconds to wait before timing out and returning 0. Leave blank to allow the function to wait indefinitely.
- ...
I use variables sometimes to denote the argument meaning in functions where either A) I tend to forget what the argument order is or B) skip some of the arguments in the function call.
For the WinWaitNotActive command, if I want to have it wait forever, the timeout has to be blank, so something like this:
- WinWaitNotActive(winTitle,,)
- WinWaitNotActive (winTitle,,forever:=???)
- WinWaitNotActive (winTitle,,forever) ; Warning: This variable appears to never be assigned a value.
- WinWaitNotActive (winTitle,,forever:=0) ; No timeout / exits immediately
- WinWaitNotActive (winTitle,,forever:=-1) ; Error: Parameter #3 of WinWaitNotActive is invalid.
- WinWaitNotActive (winTitle,,forever:="") ; Error: Parameter #3 of WinWaitNotActive requires a Number, but received an empty string.