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 

Holding jokystick with keys

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





PostPosted: Sun Apr 24, 2005 5:34 pm    Post subject: Holding jokystick with keys Reply with quote

I wrote this:
Code:

Loop
{
joy1::
GetKeyState, joyx, JoyX
GetKeyState, joyy, JoyY
if joyx > 77
   Send, z
else if joyx < 31
   Send, x
else if joyy < 31
   Send, c
else if joyy > 77
   Send, v
else
   send, l
return

joy2::
GetKeyState, joyx, JoyX
GetKeyState, joyy, JoyY
if joyx > 77
   Send, b
else if joyx < 31
   Send, n
else if joyy < 31
   Send, m
else if joyy > 77
   Send, q
else
   Send, k
return
}


Put then I realized that I can't hold these keys while using the joystick. I am new could someone explain how I could hols these keys while pressing the button on the joystick?
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Sun Apr 24, 2005 5:44 pm    Post subject: Reply with quote

Try replacing the loop with a single #Persistent right at the top and use the ~ before the hotkey (i.e. ~joy1:: .).
_________________

Back to top
View user's profile Send private message Visit poster's website
Sigma
Guest





PostPosted: Sun Apr 24, 2005 6:19 pm    Post subject: Thanks but no cigar Reply with quote

I tired it but it still didn't hold it.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Mon Apr 25, 2005 11:10 am    Post subject: Reply with quote

You might find the following topic of interest because it shows how to remap the joystick hat/POV control to keys on the keyboard. I think you could adapt this to work with the main joystick axes rather than the POV control: http://www.autohotkey.com/forum/viewtopic.php?t=1646
Back to top
View user's profile Send private message Send e-mail
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