Yes, you can modify the contents of a hotkey. First you need to create and
label your
subroutines (segments of code):
Code:
Move1: ; <-- This is your label. Name it whatever you want.
; Your code goes below the label.
MouseMove, -3, 0, 0, R
; Remember to return!
Return
Move2:
MouseMove, -30, 0, 0, R
Return
Now, assign your default action by placing the
hotkey label:
Code:
Numpad4::
Move1:
MouseMove, -3, 0, 0, R
Return
Move2:
MouseMove, -30, 0, 0, R
Return
Now, you can make F1 and F2 change the hotkey's action:
Code:
Numpad4::
Move1:
MouseMove, -3, 0, 0, R
Return
Move2:
MouseMove, -30, 0, 0, R
Return
; See the documentation for more info on the Hotkey command.
F1::Hotkey, Numpad4, Move1
F2::Hotkey, Numpad4, Move2
You could also make it so that holding down F2 and pressing it would do the different one.
But it seems to me that what you're trying to do is make the numpad into a mouse. Before you bust any more brain cells, you might want to check out this
excellent script that's already been written to do just that:
http://www.autohotkey.com/docs/scripts/NumpadMouse.htm