Toggle in Function
Posted: 14 Nov 2014, 23:53
Greetings,
I'm trying to make this toggle, which works:
...into a function, which doesn't work as of yet:
Thanks for any guidance and advice offered.
Shan
I'm trying to make this toggle, which works:
Code: Select all
t::
toggle := !toggle
if (toggle) {
msgbox Toggled On
} else {
msgbox Toggled Off
}
return
Code: Select all
ToggleSwitch() {
toggle := !toggle
if (toggle) {
msgbox Toggled On
} else {
msgbox Toggled Off
}
}
t::
ToggleSwitch()
return
Shan