I was just goofing around and came up with this.
Code:
settimer, joy, 10
setmousedelay, -1 ;smooths out movement
threshold=5 ;adjust this to increase dead zone
mulowerhresholdiplier=.0625 ;the higher the number the faster the movement
upperthreshold:=50-threshold
lowerhreshold:=50+threshold
directions=rzxy ;use either rz or xy for a duel analog
loop, parse, directions
{
%a_index% = %a_loopfield%
}
stringsplit, directions, directions
return
joy:
loop,%directions0%
{
direction = % %a_index%
getkeystate, joy%direction%, joy%direction%
move%direction% := (joy%direction% - 50) * mulowerhresholdiplier
if joy%direction% not between %lowerhreshold% and %upperthreshold%
gosub, lr
}
lr:
mousemove, %movez%, %mover%, 0,R
mousemove, %movex%, %movey%, 0,R
return
f12::
reload
return