AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Joystick remapping

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Jun 25, 2004 10:08 pm    Post subject: Joystick remapping Reply with quote

I am trying to remap my joystick for a particular game. However, by doing Joy5::Send, e , it only sends the e once. How cane I make it hold down e until I release Joy Button 5? Also, can I remap something such as Joy2::Send, Joy3, and then remap Joy3::{ENTER} without Joy2 pressing Enter? Nothing seems to work for me. Thanks for the help.
Back to top
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Fri Jun 25, 2004 10:31 pm    Post subject: Reply with quote

Code:
#UseHook

Joy5::
Send, e
Loop
{
  GetKeyState, joy5check, joy5, P
  if joy5check = D
    Send, e
  else if shiftcheck = U
    break
}
return

Joy2::Send, {Joy3}
Joy3::Send, {ENTER}

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Guest






PostPosted: Fri Jun 25, 2004 10:45 pm    Post subject: Reply with quote

Wow. Thanks so much.
Back to top
Guest






PostPosted: Fri Jun 25, 2004 10:51 pm    Post subject: Reply with quote

Sorry - I can't edit. It is working well, however, it doesn't emulate the "e" key being held down. I think this is just something in AutoHotKey. Thanks for your, help anyway.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 25, 2004 11:22 pm    Post subject: Reply with quote

It sounded like you wanted to auto-repeat the E key. Since you don't, try this:
Code:
joy5::
Send, {e down}
Loop
{
   Sleep, 10
   GetKeyState, state, joy5
   if state = U  ; The button has been released, so break out of the loop.
      break
}
Send, {e up}
return

The above will hold down the E key. You can also change it auto-repeat if desired.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Sat Jun 26, 2004 2:41 am    Post subject: Reply with quote

Please sticky this! Was exactly what I came here to find : )
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group