bbq Posted October 29, 2006 Share Posted October 29, 2006 Suppose I have the following code: WinWaitActive("Untitled -"); Send("{a down}"); Sleep(50000); Send("{a up}"); That should wait until I have notepad as the active window and then hold a down for 50000 milliseconds, correct? Unfortunately, I only get one a. My intention is to hold a key down in a game, and I of course tried it in game, but it had the same effect. Am I missing something? Link to comment Share on other sites More sharing options...
xcal Posted October 29, 2006 Share Posted October 29, 2006 You're saying you want to hold down 'a' but you're only seeing 1 'a' being spit out? Did you actually want it held down, or did you want it pressed over and over? Try something like... HotKeySet('{escape}', 'quit') WinWaitActive("Untitled -") While 1 Send("a") Sleep(100) WEnd Func quit() Exit EndFunc ;==>quit How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
bbq Posted October 29, 2006 Author Share Posted October 29, 2006 Alright, I've figured it out. I asked the question on behalf of my friend who said it didn't work in game, and seeing it not work in notepad I believed him. However, it does work in game. Sorry for the waste of time Link to comment Share on other sites More sharing options...
xcal Posted October 29, 2006 Share Posted October 29, 2006 How dare you waste my time. I spent all afternoon writing that. How To Ask Questions The Smart Way 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