The AutoHotkey Beginner Tutorial starts off with an example using the Send
command, with the command and its argument separated by a comma:
^j:: Send, My First Script Return
...
SEND
is the command, anything after the comma (,) will be typed.
Later, it gives an example of the MsgBox
command with no comma:
esc:: MsgBox Escape!!!! Return
Experimentally, it seems that including or omitting the comma makes no difference to the behaviour of a command, at least in these simple cases. We can change whether the comma is included in both examples above and the command still works: MsgBox, Escape!!!
works, and so does Send My First Script
.
Are there circumstances in which the syntax requires the comma (or forbids it)? Does the inclusion of the comma alter the semantics of the command in any way? Why are both syntaxes allowed?
It specifies a RANGE over which to apply the d command. Ranges can be specified with patterns like this: sed -e '/START/,/END/ command' # apply command on lines between START and END pattern.
The comma (,
) in AutoHotkey is a separator. The first (between the command and the first parameter) is completely optional in most circumstances:
Tip: The first comma of any command may be omitted (except when the first parameter is blank or starts with := or =, or the command is alone at the top of a continuation section). For example:
MsgBox This is ok. MsgBox, This is ok too (it has an explicit comma).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With