Closed duianto closed 5 years ago
In AutoHotkey v2, parentheses can be omitted if a function is used at the start of a line. See https://lexikos.github.io/v2/docs/Functions.htm#intro
For demonstration purposes, this is done for almost every function without a return value in the docs.
The definition (yellow box) for the following commands, doesn't show parentheses around the parameters, but the examples at the bottom of the page uses parentheses.
https://lexikos.github.io/v2/docs/commands/ClipWait.htm https://lexikos.github.io/v2/docs/commands/ComObjConnect.htm https://lexikos.github.io/v2/docs/commands/ControlSetStyle.htm https://lexikos.github.io/v2/docs/commands/ControlSetText.htm https://lexikos.github.io/v2/docs/commands/DriveEject.htm https://lexikos.github.io/v2/docs/commands/DriveLock.htm https://lexikos.github.io/v2/docs/commands/DriveSetLabel.htm https://lexikos.github.io/v2/docs/commands/DriveUnlock.htm https://lexikos.github.io/v2/docs/commands/ImageSearch.htm https://lexikos.github.io/v2/docs/commands/OnClipboardChange.htm https://lexikos.github.io/v2/docs/commands/OnExit.htm https://lexikos.github.io/v2/docs/commands/PixelSearch.htm https://lexikos.github.io/v2/docs/commands/ProcessSetPriority.htm https://lexikos.github.io/v2/docs/commands/WinSetTitle.htm https://lexikos.github.io/v2/docs/commands/WinWait.htm https://lexikos.github.io/v2/docs/commands/WinWaitActive.htm https://lexikos.github.io/v2/docs/commands/WinWaitClose.htm
And the command: https://lexikos.github.io/v2/docs/commands/NumGet.htm has parentheses in the definition, but NumPut doesn't: https://lexikos.github.io/v2/docs/commands/NumPut.htm
https://lexikos.github.io/v2/docs/objects/Object.htm#RawSet doesn't show parentheses but the other obj commands on the same page do.
The definitions for some commands are shown both with and without parentheses: https://lexikos.github.io/v2/docs/commands/Gosub.htm https://lexikos.github.io/v2/docs/commands/Goto.htm
so maybe parentheses are optional for some commands.