| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri Aug 27, 2004 11:58 pm Post subject: Gradual Arrow Press |
|
|
I'll try to articulate this the best I can...
When playing racing games with a keyboard, the up arrow key is 9 times out of ten the accelerator pedal. The problem with this is that the key only has an on and off position. There is no in between. It's either floor the pedal, or don't even touch it.
Is there a way to make it so that when you press down on any arrow key, the longer you press, the more a racing game will respond. More specifically, I would like to have it so that when you press on the up arrow, you slowly push the accelerator pedal in until you let go of the pedal. Then, it slowly comes back..or maybe it only comes back with another button.
Any help is greatly appreciated. Thanks. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat Aug 28, 2004 12:26 am Post subject: |
|
|
| It depends on how the game allows you to specify an acceleration level other than min or max: If the only way to do it is with a joystick or foot pedal, you're probably out of luck because AutoHotkey cannot simulate joystick movement. But if there's some way to do it with keystrokes or mouse clicks, you could probably create a hotkey to improve things. |
|
| Back to top |
|
 |
WhiteCloud
Joined: 19 Jun 2004 Posts: 68
|
Posted: Sat Aug 28, 2004 7:44 pm Post subject: |
|
|
I love these gaming related threads.
If there's no way to do what Chris said the next best thing is to do something like this:
Up::
Send {Up down}
sleep 10
Send {Up up}
sleep 10
Send {Up down}
sleep 11
Send {Up up}
sleep 9
Send {Up down}
sleep 12
Send {Up up}
sleep 8
Send {Up down}
sleep 13
Send {Up up}
sleep 7
Send {Up down}
sleep 14
Send {Up up}
sleep 6
Send {Up down}
sleep 15
Send {Up up}
sleep 5
Send {Up down}
sleep 16
Send {Up up}
sleep 4
Send {Up down}
sleep 17
Send {Up up}
sleep 3
Send {Up down}
sleep 18
Send {Up up}
sleep 2
Send {Up down}
sleep 19
Send {Up up}
sleep 1
Send {Up}
Return
I haven't tried this out. Will the 2nd to last line simulate the up key being held down until the up key is phyically released? I'm not sure how to go about that part. The rest of the code would need some tweaking of the sleep times since I think I've read that Windows has a higher minimum of value for those. _________________ AHK = Hella fun |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Aug 28, 2004 8:46 pm Post subject: |
|
|
Maybe you can shrink the code using a loop and something like this
| Code: | S1 +=
S2 -=
sleep %S1%
Send {Up down}
sleep %S2%
Send {Up up} |
|
|
| Back to top |
|
 |
|