'WatchAxis' is not a command, just a random
label name for a subroutine (see
https://autohotkey.com/docs/misc/Labels.htm). You could also call it 'WashMyCar' instead, but if you look closely, you see that SetTimer (
https://autohotkey.com/docs/commands/SetTimer.htm) calls it every 5 milliseconds - it will probably be a little bit slower in practice.
So, naturally, the link I provided doesn't mention this specific label name. I just wanted to hint at the difference of
directive "
#ifWinActive" vs. the
command "IfWinActive" (
https://autohotkey.com/docs/commands/WinActive.htm). So... if you add the WinActive command, including the window name, to the subroutine called 'WatchAxis' (including { } brackets around the commands that should be executed if 'true'; the same as with the if command there) , it would be also executed every 5ms and would make your script kind of "window-sensitive".
Btw, your subroutine called 'WatchAxis' also misses a 'return' at the end - which probably doesn't hurt in the specific case of this short snippet, but if you would have additional code, like other subroutines, after that code block, then it would matter. Then script execution just would 'fall through' to the next 'return'...
I would recommend to take also a look at the Tutorial (
https://autohotkey.com/docs/Tutorial.htm) to get a hang of the basic concepts of AHK, although (Set)Timer(s) and Labels are not really covered there. For these, look at the links above.