Basically, what is the difference between this
#HotIf MouseIsOver("ahk_class Shell_TrayWnd")
WheelUp::Volume_Up
WheelDown::Volume_Down
#HotIf
; Other code that follows
and this?
#HotIf MouseIsOver("ahk_class Shell_TrayWnd")
WheelUp::Volume_Up
WheelDown::Volume_Down
Return
; Other code that follows
Also, do I even need closing #HotIf (or return)?
What if I write this?
#HotIf MouseIsOver("ahk_class Shell_TrayWnd")
WheelUp::Volume_Up
WheelDown::Volume_Down
; Other code that follows
Returndoesn't do anything here.In v1 you used to end a hotkey block with
Return, like so:(Thought, this does not apply for one-liner hotkeys, like in your example. They always just execute the one single line)
But in v2, hotkey blocks are enclosed in
{ }, soReturnisn't used here:Ok, then onto the next question, why do you need
#HotIf?Well it ends the context sensitive block. If you never end your context sensitive block, it never ends.
Consider this
What you should've done, is: