Jump to content
ZeeshanA

Setting SendKeyDelay when executing it with AutoIt3ExecuteLine

Recommended Posts

ZeeshanA

Following command sends the key strokes with 10 ms delay (default).

AutoIt3 /AutoIt3ExecuteLine "Send('Hello World!')"

Can I set the delay with something like:

AutoIt3 /AutoIt3ExecuteLine "Opt('SendKeyDelay', 150);Send('Hello World!')"

The above command doesn't work and I couldn't find how to run multiple commands in a single line.

Thanks

Share this post


Link to post
Share on other sites
AdamUL

One way is to use operators.  There are multiple ways of doing this.  Give this a try.  

AutoIt3 /AutoIt3ExecuteLine "(Opt('SendKeyDelay', 150) + Send('Hello World!'))"

 

Adam

Edited by AdamUL
  • Thanks 1

Share this post


Link to post
Share on other sites
therks

@AdamUL You'll have to assign those commands to a variable, or enclose in parentheses, as otherwise it's an invalid line. ^_^

/AutoIt3ExecuteLine "$v = Opt('SendKeyDelay', 150) & Send('Hello World!')"

OR

/AutoIt3ExecuteLine "(Opt('SendKeyDelay', 150) & Send('Hello World!'))"

 

Edited by therks
  • Thanks 1

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

×