Jump to content

Help with Send command


Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...