Error: Parameter #3 invalid.
Line#
---> 001: MsgBox(InStr("aaa_XY_bbb", "xy", "1WrongArg"))
... is what you'd get with AutoHotkey v2.
InStr in AutoHotkey v1 (but not v2) expects an
integer for the CaseSensitive parameter. It does not interpret the parameter directly as boolean. Otherwise, "WrongArg" would be considered
true.
For parameters that must be numbers, AutoHotkey v1 interprets values according to the underlying C functions, such as atoi and strtoi. These functions attempt to convert the string to a number, stop processing at the first non-numeric character, and ignore the rest. If there are no numeric characters, the result is probably always 0.
SKAN wrote:FileSelectFile, OutputVar, m16@!#!@!$!!$ is valid
No; that is one of many cases where an
invalid parameter value is not detected. (But I see no problem with wanting to replicate the behaviour.)