this is what i have (sightly motified copy from ahk help text)
#Persistent ; Keep this script running until the user explicitly exits it.
SetTimer, WatchAxis, 5
return
WatchAxis:
GetKeyState, JoyX, JoyX ; Get position of X axis.
GetKeyState, JoyY, JoyY ; Get position of Y axis.
GETKEYSTATE, JOYZ, JOYZ
GETKEYSTATE, JOYR, JOYR
KeyToHoldDownPrev = %KeyToHoldDown% ; Prev now holds the key that was down before (if any).
if JoyY < 30
KeyToHoldDown = Up
else if JoyY > 70
KeyToHoldDown = Down
else if JoyX > 70
KeyToHoldDown = E
else if JoyX < 30
KeyToHoldDown = Q
ELSE IF JOYZ > 70
KEYTOHOLDDOWN = RIGHT
ELSE IF JOYZ < 30
KEYTOHOLDDOWN = LEFT
else
KeyToHoldDown =
if KeyToHoldDown = %KeyToHoldDownPrev% ; The correct key is already down (or no key is needed).
return ; Do nothing.
; Otherwise, release the previous key and press down the new key:
SetKeyDelay -1 ; Avoid delays between keystrokes.
if KeyToHoldDownPrev ; There is a previous key to release.
Send, {%KeyToHoldDownPrev% up} ; Release it.
if KeyToHoldDown ; There is a key to press down.
Send, {%KeyToHoldDown% down} ; Press it down.
returnPlease post your script within [code] [/code] tags
Please don't disable BBCode.
Please don't create duplicate threads. The other thread has been deleted.




