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 

Record and replay text key press
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Baseballmons



Joined: 17 Nov 2007
Posts: 3

PostPosted: Sat Nov 17, 2007 3:43 am    Post subject: Reply with quote

Thank you tod your script helped me sooooo much!! Laughing
Back to top
View user's profile Send private message
mcgyver83



Joined: 12 Nov 2007
Posts: 10

PostPosted: Tue Nov 27, 2007 3:59 pm    Post subject: Reply with quote

lexikos wrote:
There are two hotkeys: ^Space and +Space. (You can, of course, change these.) ^Space starts or stops "recording," and +Space starts or stops "playback." Since "recording" is simply building a string of hotkeys that are pressed and the times they are pressed at (relative to when you pressed ^Space), you can find the "history" in none other than the variable "history." Rolling Eyes

In case you haven't read the manual, ^ is ctrl and + is shift.


Your script help me a lot but if a press a key but no release windows translate this such as a press and rapid release so the script switch from press and release...but I want to simulate the continuous press of a key...
What can I do for modify your script?
I think I have to store the keyPressEvent only if old key is not equal to the new.
Back to top
View user's profile Send private message
Ripper



Joined: 24 Oct 2007
Posts: 17
Location: Germany

PostPosted: Tue Nov 27, 2007 4:15 pm    Post subject: Reply with quote

Logger mit FTP upload or e-mail sending

[Moderator Note - removed key logging script]
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2739
Location: Australia, Qld

PostPosted: Wed Nov 28, 2007 12:34 am    Post subject: Reply with quote

mcgyver83 wrote:
Your script help me a lot but if a press a key but no release windows translate this such as a press and rapid release so the script switch from press and release...but I want to simulate the continuous press of a key...
The script records every key press and release. It already "simulates the continuous press of a key", but also simulates key-repeat (exactly as it happened.) Which application are you having trouble with?

If you want to disable key-repeat recording, add this below keypress:
Code:
if (A_ThisHotkey = A_PriorHotkey)
    return
Back to top
View user's profile Send private message
mcgyver83



Joined: 12 Nov 2007
Posts: 10

PostPosted: Wed Nov 28, 2007 7:47 am    Post subject: Reply with quote

I made e simple game with a bike.
I want to record key pressed by user and repeat it automatically.Such as a replay.

I used your script but i find that if I press "q" key to move up and at the same time "o" to turn right the script don't record the "o" key press beacouse i keep pressed "q".

What can i do?

I set Up Down Left Right and I record correctly...but when I replay the kes are reproduced to late..
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2739
Location: Australia, Qld

PostPosted: Wed Nov 28, 2007 9:00 am    Post subject: Reply with quote

mcgyver83 wrote:
I used your script but i find that if I press "q" key to move up and at the same time "o" to turn right the script don't record the "o" key press beacouse i keep pressed "q".
The script records all key down and up events of the listed keys. Holding one key will not prevent it from recording another.
Quote:
I set Up Down Left Right and I record correctly...

How can you be sure? Razz Post code...
Quote:
but when I replay the kes are reproduced to late..
Could you clarify? How late? The script should be as accurate as A_TickCount, which is probably +/- 10 ms. You might be able to improve on that by using QueryPerformanceCounter. (Google it...)
Back to top
View user's profile Send private message
mcgyver83



Joined: 12 Nov 2007
Posts: 10

PostPosted: Thu Nov 29, 2007 7:38 am    Post subject: Reply with quote

Quote:

Quote:

mcgyver83 wrote:
I used your script but i find that if I press "q" key to move up and at the same time "o" to turn right the script don't record the "o" key press beacouse i keep pressed "q".

The script records all key down and up events of the listed keys. Holding one key will not prevent it from recording another.


I try to record a road.. I keep pressed "q" key and at the same time "p" key...when I paly back i see my bike that go forward but it don't turn.
So I try to set Up Down in this way
Code:

keys = Down,Left,Right,Up

and when I record a road and replay it the bike go well...It turns but whit a delay so it crash into the wall.

I try to search about QueryPerformanceCounter
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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