AutoHotkey Community

It is currently May 26th, 2012, 4:59 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: February 21st, 2009, 7:09 pm 
Offline

Joined: September 17th, 2005, 6:43 pm
Posts: 242
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group