Red-Steel Posted September 8, 2009 Share Posted September 8, 2009 Hello, How can I hold a key down for like 10 seconds in autoit? I tried: Send("{a down}") Sleep ( 10000 ) Send("{a up}") but it doesn't seem to work since it only sends 1 "a", wait 10 seconds and then close. thanks! Link to comment Share on other sites More sharing options...
andygo Posted September 8, 2009 Share Posted September 8, 2009 use the option AutoItSetOption ( SendKeyDownDelay, 10000) Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). Link to comment Share on other sites More sharing options...
Red-Steel Posted September 8, 2009 Author Share Posted September 8, 2009 use the option AutoItSetOption ( SendKeyDownDelay, 10000) Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). Thanks, it stills only send only one "a" but I'll try inside the game to see if it really does hold the key down. 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