Sign in to follow this  
Followers 0
Sharn

Send command problem

5 posts in this topic

I have created this simple script:

-------------------------------------------------

Run("C:\windows\Notepad.exe")

Send("{a down}")

Sleep(5000)

Send("{a up}")

Exit

-------------------------------------------------

But in the notepad screen appears only ONE "a" character also if modify the sleep directive.

Why?

Share this post


Link to post
Share on other sites



Try this:

AutoItSetOption ("SendKeyDownDelay", 5000)

Run("C:\windows\Notepad.exe")

Send("a")
AutoItSetOption ("SendKeyDownDelay", 5)

Share this post


Link to post
Share on other sites

Ya but it's strange that it's not working.

Share this post


Link to post
Share on other sites

I have created this simple script:

-------------------------------------------------

Run("C:\windows\Notepad.exe")

Send("{a down}")

Sleep(5000)

Send("{a up}")

Exit

-------------------------------------------------

But in the notepad screen appears only ONE "a" character also if modify the sleep directive.

Why?

After you Send("{a down}") you have told the script to Sleep(5000) so it only manages to send "a" once before it sleeps. Instead of using sleep lookup Opt("SendKeyDownDelay", 1) in the help file.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Then... how can I use {* down/up}?

Share this post


Link to post
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
Sign in to follow this  
Followers 0