andrew01 Posted September 10, 2006 Share Posted September 10, 2006 Hi there,I've just recently started using auto-it, trying to make some scripts for various things. I have been reading the help file for the most part to learn more about the commands in this language. One thing I cannot seem to find is this:Basically I want a key to be pressed down for a certain number of seconds. This is what I tried to come up with, but I have tested it multiple times and I cannot seem to figure it out:send("{UP down}")sleep(5000)send("{UP up}")When I execute that it seems as if it is just pressing the "UP" key down then immediately releasing it. Any help with this would be much apprciated. Thank you. Link to comment Share on other sites More sharing options...
MHz Posted September 10, 2006 Share Posted September 10, 2006 Use Opt() to set a delay. The UP key does not have a natural down state like a SHIFT key can have. Opt('SendKeyDownDelay', 5000) Send('{UP}') Opt('SendKeyDownDelay', 1)oÝ÷ Úî²)ài@Ŷ©¥êâ~ëu©hµ«¢+Ù}-å½Ý¸ ÌäííUAôÌäì°ÔÀÀÀ¤()Õ¹}-å½Ý¸ ÀÌØíä°ÀÌØíÑ¥µ¤(%=ÁÐ ÌäíM¹-å½Ý¹±äÌäì°ÀÌØíÑ¥µ¤(%M¹ ÀÌØíä¤(%=ÁÐ ÌäíM¹-å½Ý¹±äÌäì°Ä¤)¹Õ¹ Link to comment Share on other sites More sharing options...
andrew01 Posted September 10, 2006 Author Share Posted September 10, 2006 Awesome, thank you very much for the fast reply It was a big help. 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