Rydextillxixdiex Posted June 16, 2008 Share Posted June 16, 2008 I need help with the send command. I believe from my understanding that you can send an arrow key, and have it held down until the up command is sent for it, however i do not know how to accomplish this. Also, while say the up arrow is being help down, can other arrow keys be pressed, before the up arrow is released? A demonstration code would be greatly appreciated. Thanks for all help in advance, Brandon ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 16, 2008 Share Posted June 16, 2008 Send("{UP down}some other keys{ENTER}{UP up}") This will hold the up key, type "some other keys" hit enter, then let the up key go. Link to comment Share on other sites More sharing options...
Rydextillxixdiex Posted June 16, 2008 Author Share Posted June 16, 2008 Send("{UP down}some other keys{ENTER}{UP up}") This will hold the up key, type "some other keys" hit enter, then let the up key go. What if i want to send other arrow keys though while it is being held, and what about pauses. Would something like this work? Send("{UP down}") Send("{Right}") Send("{Left}") Sleep(10000) Send("{UP up}") Will the Up key remain pressed down until after the sleep? ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
Rydextillxixdiex Posted June 16, 2008 Author Share Posted June 16, 2008 I tested my own script, and the Right, and Left commands are not send during the code, instead it just keeps hold the up arrow. Any Ideas? ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 16, 2008 Share Posted June 16, 2008 It depends on the receiving program. Some programs can't process more than one key at a time. Are you trying to send this to a game? It should work. That's what the { up} { down} functionality is for. Link to comment Share on other sites More sharing options...
Rydextillxixdiex Posted June 16, 2008 Author Share Posted June 16, 2008 It is to a game, and like i said the Right and Left commands, during the duration of the UP holding down does not work. Any other way i can do this? ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
UPSman2 Posted June 16, 2008 Share Posted June 16, 2008 Send("{UP down}") Send("{Right down}") Send("{Left down}") Sleep(10000) Send("{UP up}") Send("{Right Up}") Send("{Left Up}") does that work? Link to comment Share on other sites More sharing options...
Rydextillxixdiex Posted June 16, 2008 Author Share Posted June 16, 2008 Actualy, i believe the previous code i had was working, how ever since it was RIGHT immediately followed by LEFT, i couldn't notice the commands when watching it at work. By using the following, i can see it DOES in fact work. HotKeySet("{F9}", "Start") While 1 Sleep(1000) Wend Func Start() Send("{UP down}") Sleep(2000) Send("{RIGHT down}") Sleep(500) Send("{RIGHT up}") Sleep(5000) Send("{UP up}") EndFunc ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 16, 2008 Share Posted June 16, 2008 I told you it should be working. Link to comment Share on other sites More sharing options...
Rydextillxixdiex Posted June 16, 2008 Author Share Posted June 16, 2008 Yep, you were right thanks for all of your help, my script has been correct for a few days now, i just didn't have the hold and sleep commands on the arrow keys like needed lol....n00b ...will never learn all there is to know about autoit, no worries...i came to the forums :) 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