Reputation: 33
Understanding the problem is quite easy - each time AutoIt is sending its stuff, a keyboard-user's stuff gets missed exactly the Opt("SendKeyDownDelay",50)
time.
Upvotes: 0
Views: 8214
Reputation: 33
In my case, the Opt("SendKeyDownDelay",50) statement is given and a keyboard-emulation is absolutely welcome.
AutoIt was very user-friendly there.
Finally,
Send("{X DOWN}")
Sleep(50)
Send("{X UP}")
And the Opt("SendKeyDownDelay",0) statement can do exactly what was excepted. You'd need a function to send strings, but the key down time is easy to change with that method.
Maybe someone can use that, i can. (Remember to replace X with a key of your choice)
Thanks for your tips and greetings
Tim
Upvotes: 0
Reputation: 1904
If you want to send data as quickly as possible in addition to not interrupting you can use the clipboard.
Here are three examples:
Example one (listed above):
$data = "I want to send this!"
ControlSend( "", "", "", $data )
Example Two (fastest way):
$data = "I want to send this!"
ClipPut($data) ;puts text in clipboard
ControlSend( "", "", "", "^v" ) ;pastes text instantly
Example Three (clipboard without ControlSend):
$data = "I want to send this!"
ClipPut($data)
Send("^v")
Additionally you can clear the clipboard with: ClipPut('')
Upvotes: 2
Reputation: 2946
The alternative to send is ControlSend ( "", "", "", "e")
This will send an "e" to an active window without interrupting the input.
Upvotes: 2