Ritz Posted August 24, 2006 Share Posted August 24, 2006 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 More sharing options...
evilertoaster Posted August 24, 2006 Share Posted August 24, 2006 As honest as your intentions might be, you are still asking for a way to log key strokes which is kinda a touchy subject here.http://www.autoitscript.com/forum/index.php?showtopic=14632The typical answers to such questions are usually "_IsPressed" or making hotkeys for certian buttons. Link to comment Share on other sites More sharing options...
Ritz Posted August 25, 2006 Author Share Posted August 25, 2006 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 More sharing options...
Ritz Posted August 25, 2006 Author Share Posted August 25, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now