heman Posted September 17, 2009 Share Posted September 17, 2009 $i=0 while $i=0 ControlSend("MyGame","","","1") Sleep(Random(800,2555)) if Random(1,15,1)=1 then ControlSend("MyGame","","","2") WEnd thats my code, it simply send 1 or 2 with randoms between 800 and 2555 ms delay. This is working perfect BUT: on other windows i do work and obviously autoit forgets some keys pressed. Every 5-10 seconds it happens that my CTRL or CAPTCHA or SHIFT or combination is kept pressed! So while i develop on other windows then "MyGame" i sometimes type things in big chars, i sometimes DELETE whole line because CTRL and SHIFT is pressed at same time and i click "m" and whole line goes. Something is doing wrong. Can someone help me please? I am using vista 64bit business edition on dual xeon and dual desktop. regards Link to comment Share on other sites More sharing options...
jvanegmond Posted September 17, 2009 Share Posted September 17, 2009 Why do you think the problem is in the sending part, and not on the receiving part? : ) You're probably using this for a game, but AutoIt is often too fast and clever for the game. So the game gets confused and it thinks that the shift or control key is still pressed down, but it's not! Try sending a your keys to the game slower, and give it more time to process your keys. Check out the AutoIt options SendKeyDelay and SendKeyDownDelay. You can also try sending shift or ctrl up commands, check out the send key list for {SHIFTUP}. github.com/jvanegmond 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