Code: Select all
SysGet, bswapped, 23
if (bswapped=0) and (%A_Hour%<20)
MsgBox The mouse buttons are not swapped, and it is before 8 p.m.
Code: Select all
SysGet, bswapped, 23
if (bswapped=0) and (%A_Hour%<20)
MsgBox The mouse buttons are not swapped, and it is before 8 p.m.
Code: Select all
SysGet, bswapped, 23
if (bswapped=0) and (A_Hour<20)
MsgBox The mouse buttons are not swapped, and it is before 8 p.m.
Thank you for the explanation. That was a small detail which I was not aware of.ThePeter wrote: ↑16 Nov 2022, 14:30As your if condition begins with opening parantheses, the condition is interpreted as an expression. In an expression, you should use A_Hour without the enclosing percent signs. In an expression, %A_Hour% will return an empty value, which in turn is evaluated as being smaller than 20.