f1() {
msgbox % A_ThisFunc
}
f2() {
msgbox % A_ThisFunc
}
f1()f2()
msgb
( LTrim Join
o
x % A
_UserN
ame
)
MsgBox,
(
Hello
) World
(
!
)
MsgBox, When writing in plain text
, you can continue your line onto the next
. Just make sure to punctuate at the start
! For some reason commas, when used in this manner
, don't cause leading whitespace
, but all other punctuation does
. Isn't that great
? This feature was designed for use with expressions
, but it works fine without them too!
Okay, this one is actually kind of cool. Obviously doesn't handle JSON
types like null
.
obj :=
( LTrim Join
{
"key": "value",
"list": [
"item1",
"item2"
]
}
)
for k, v in obj {
msgbox % k " " v
}
In some situations, the dual purpose single-equals operator (normally plain-text assignment or case-insensitive equality) can take on a third purpose: expression assignment.
MsgBox, % "Test: "
. (a = 1 ; Comparison
, b = 2 ; Expression assignment
, c = b + 1) ; Expression assignment
. "," a "," b "," c
Just why?
#MaxHotkeysPerInterval, 9140
#MaxThreadsPerHotkey 255
#MaxThreads 255
SetBatchLines, -1
SetKeyDelay -1, -1
SendInput, a
~a::SendInput bb
~b::SendInput cc
~c::SendInput dd
~d::SendInput ee
~e::SendInput aa