 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
dj_anubis Guest
|
Posted: Sun Oct 18, 2009 8:23 pm Post subject: help remap joy button to ctrl+alt |
|
|
hello everyone
here is a script i am used to run
| Code: |
WaitFor1joy4:
if not GetKeyState("1joy4") ; The button has been released.
{
Send {alt up} ; Release the RALT.
SetTimer, WaitFor1joy4, off ; Stop monitoring the button.
return
}
; Since above didn't "return", the button is still being held down.
Send {alt down} ; Send another RALT keystroke.
return
1joy5::
Send {ctrl down} ; Press the RALT down.
SetTimer, WaitFor1joy5, 50 ; Reduce the number 30 to 20 or 10 to send keys faster. Increase it to send slower.
return
WaitFor1joy5:
if not GetKeyState("1joy5") ; The button has been released.
{
Send {ctrl up} ; Release the RALT.
SetTimer, WaitFor1joy5, off ; Stop monitoring the button.
return
}
; Since above didn't "return", the button is still being held down.
Send {ctrl down} ; Send another RALT keystroke.
return
|
basiclly its a script which do the following thing
if i press the joystick button 5, the computer "thinks" i pressed CTRL
and if i press joystick button 4, th computer "thinks" i pressed ALT
here is what i need
I want that when i press Joystick button 6, the computer will think that i pressed CTRL+ALT
please help me, it shouldn`t be hard problem, i think
waiting for your reply, thank you[/code] |
|
| Back to top |
|
 |
txquestor
Joined: 22 Aug 2009 Posts: 294
|
Posted: Sun Oct 18, 2009 9:59 pm Post subject: |
|
|
I added the joy6 in red to your script.
Just replace your script with the new one.
| Code: |
WaitFor1joy4:
if not GetKeyState("1joy4") ; The button has been released.
{
Send {alt up} ; Release the RALT.
SetTimer, WaitFor1joy4, off ; Stop monitoring the button.
return
}
; Since above didn't "return", the button is still being held down.
Send {alt down} ; Send another RALT keystroke.
return
1joy5::
Send {ctrl down} ; Press the RALT down.
SetTimer, WaitFor1joy5, 50 ; Reduce the number 30 to 20 or 10 to send keys faster. Increase it to send slower.
return
WaitFor1joy5:
if not GetKeyState("1joy5") ; The button has been released.
{
Send {ctrl up} ; Release the RALT.
SetTimer, WaitFor1joy5, off ; Stop monitoring the button.
return
}
; Since above didn't "return", the button is still being held down.
Send {ctrl down} ; Send another RALT keystroke.
WaitFor1joy6:
if not GetKeyState("1joy6") ; The button has been released.
{
Send {ctrl up}{alt up} ; Send Ctrll+Alt
SetTimer, WaitFor1joy6, off ; Stop monitoring the button.
return
}
Send {ctrl down}{alt down} ; Send another Ctrl+Alt keystroke.
return
|
_________________
"Man's quest for knowledge is an expanding series whose limit is infinity" |
|
| Back to top |
|
 |
dj_anubis Guest
|
Posted: Mon Oct 19, 2009 12:15 am Post subject: thank you |
|
|
thank you very much bro
You helped me A LOT!!!  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|