| View previous topic :: View next topic |
| Author |
Message |
adrian783
Joined: 22 Feb 2010 Posts: 2
|
Posted: Mon Feb 22, 2010 10:25 pm Post subject: how to send simultanoues keypresses? |
|
|
im trying to make macros for street fighter 4. but 1 problem i have is when the game calls for simultaneous button presses.
i use
| Code: | Send {x down}{y down}{l down}
|
but the game will not take that as 3 simultaneous keystrokes but rather, x, then xy, then l. basically, it's inconsistent.
is there a way to truly send 3 simultaneous keystrokes as if im pressing down on them on my keyboard at the same time?
Last edited by adrian783 on Tue Feb 23, 2010 12:13 am; edited 1 time in total |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5333 Location: San Diego, California
|
Posted: Tue Feb 23, 2010 12:01 am Post subject: |
|
|
edit: btw, your subject line says 2, the body of the post says 3.
I doubt that a human, working through a keyboard can send all 3 keys simultaneously.
There are factors such as when a key is actually deemed 'hit'.
These are affected by contact wear and dirt and keyboard debouncing algorithm.
This is not difinitive, but you can check the Ahk response detection yourself. Run the first 3 scripts,
or just the last, the timing is several ms off either way.
A_TickCount
The number of milliseconds since the computer was rebooted. By storing A_TickCount in a variable, elapsed time
| Code: | #SingleInstance, Force
return
a::ATime:= A_TickCount
f10::msgbox atime%atime% ; read the hit times |
| Code: | #SingleInstance, Force
return
d::DTime:= A_TickCount
f12::msgbox dtime%dtime% ; read the hit times |
| Code: | #SingleInstance, Force
return
s::STime:= A_TickCount
f11::msgbox stime%stime% ; read the hit times |
Don't use this script with the other 3, it will interfere with other scripts detecting the hotkey.
| Code: | #SingleInstance, Force
return
a::ATime:= A_TickCount
s::STime:= A_TickCount
d::DTime:= A_TickCount
return
f11::msgbox atime%atime%`nstime%stime%`ndtime%dtime% ; read the hit times |
|
|
| Back to top |
|
 |
godsstigma
Joined: 04 Nov 2008 Posts: 222 Location: Memphis, TN
|
Posted: Tue Feb 23, 2010 12:11 am Post subject: |
|
|
Try SendInput, it will send the keys faster and will increase the possibility of the game recognizing it as a "simultaneous" key press.
I am pretty sure that a keyboard can not send more than one keystroke at a time. |
|
| Back to top |
|
 |
adrian783
Joined: 22 Feb 2010 Posts: 2
|
Posted: Tue Feb 23, 2010 12:24 am Post subject: |
|
|
| godsstigma wrote: | Try SendInput, it will send the keys faster and will increase the possibility of the game recognizing it as a "simultaneous" key press.
I am pretty sure that a keyboard can not send more than one keystroke at a time. |
| Code: | #IfWinActive ahk_class STREET FIGHTER IV
k::
SendEvent {x down}{y down}{l down}
SendEvent {x up}{y up}{l up}
return |
only send and send event works. input/raw/play doesn't seem to be recognized. |
|
| Back to top |
|
 |
|