| View previous topic :: View next topic |
| Author |
Message |
Baseballmons
Joined: 17 Nov 2007 Posts: 3
|
Posted: Sat Nov 17, 2007 3:43 am Post subject: |
|
|
Thank you tod your script helped me sooooo much!!  |
|
| Back to top |
|
 |
mcgyver83
Joined: 12 Nov 2007 Posts: 10
|
Posted: Tue Nov 27, 2007 3:59 pm Post subject: |
|
|
| 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."
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 |
|
 |
Ripper
Joined: 24 Oct 2007 Posts: 17 Location: Germany
|
Posted: Tue Nov 27, 2007 4:15 pm Post subject: |
|
|
Logger mit FTP upload or e-mail sending
[Moderator Note - removed key logging script] |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2739 Location: Australia, Qld
|
Posted: Wed Nov 28, 2007 12:34 am Post subject: |
|
|
| 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 |
|
 |
mcgyver83
Joined: 12 Nov 2007 Posts: 10
|
Posted: Wed Nov 28, 2007 7:47 am Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2739 Location: Australia, Qld
|
Posted: Wed Nov 28, 2007 9:00 am Post subject: |
|
|
| 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? 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 |
|
 |
mcgyver83
Joined: 12 Nov 2007 Posts: 10
|
Posted: Thu Nov 29, 2007 7:38 am Post subject: |
|
|
| 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 |
|
 |
|