AutoHotkey Community

It is currently May 27th, 2012, 4:21 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: February 22nd, 2010, 11:25 pm 
Offline

Joined: February 22nd, 2010, 11:16 pm
Posts: 2
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 February 23rd, 2010, 1:13 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2010, 1:01 am 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
edit: btw, your subject line says 2, the body of the post says 3. :oops:

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
:arrow: 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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2010, 1:11 am 
Offline

Joined: November 4th, 2008, 10:25 pm
Posts: 222
Location: Memphis, TN
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2010, 1:24 am 
Offline

Joined: February 22nd, 2010, 11:16 pm
Posts: 2
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Mickers, rbrtryn and 69 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group