$RButton:: Send, {RButton Down} Loop { GetKeyState, state, RButton , P if state = D { Send, {r} Sleep,500 } if state = U { Send,{RButton UP} break } } Return