This code works, but I wonder if I can create a group which contains all allowed values,
so that the if statement checks if the value is an allowed one.
Code: Select all
F11::
variable = 3
if (variable = 4) or (variable = 3) or (variable = 2)
{
MsgBox, correct
}
else
{
MsgBox, incorrect
}
return
However, I think I saw somewhere here a better solution.
Here some kind of PSEUDO code:
Code: Select all
F12::
allowedValues = [2, 3, 4}
variable = 3
if variable is in allowedValues
{
MsgBox, correct
}
else
{
MsgBox, incorrect
}
return
P.S: I tried it with GroupAdd, but then I recognized that command was only made for WinTitles.
Thanks for any help and best regards