Jump to content

ScriptWriter for keys and delays?


Ritz
 Share

Recommended Posts

I am making a bot to navigate what is essentially a 2-dimensional, top down maze. The easiest way to do this would be to have something record my keystrokes and generate the autoit file that mimics them. However, I can't get ScriptWriter to record this functionality, nor find anything on the forum about this.

Is there a way to get ScriptWriter to record my key presses and the delay between when they were held down and when they were lifted?

Link to comment
Share on other sites

Ok, thanks for the reply and help. I'm sure I can figure out how to write my own, this explains why ScriptWriter doesn't have the obvious functionality I guess.

Great tool though, I'm really enjoying it!

Link to comment
Share on other sites

Ok, thanks for the reply and help. I'm sure I can figure out how to write my own, this explains why ScriptWriter doesn't have the obvious functionality I guess.

Great tool though, I'm really enjoying it!

Ok, I wrote the key recorder script that I was asking about, but it seems like my timings are off a little bit. Since this game is very time sensitive on my actions (it's a plane, so if you have momentum and drift a little while longer than the actual keystrokes, you're going to overshoot a tight turn).

I don't know how much detail I'm allowed to give out on the forums, but I used isPressed like was suggested and got my arrow keys, and used TimerInit() and TimerDiff() to check how long between things. I thought it might have been an issue with file IO being a little slow, so I started just buffering the generated code to a string while recording, and write out when I hit escape. However, I still have the same problem. I wouldn't think it's an issue with the time it takes to check the keys, since I am only checking 5 of them, and that should be done in less than 5 ms I would hope.

Any help on how I can get a more accurate delay?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...