I'm using an AutoHotKey script in Windows 7 to send the contents of the clipboard as a series of keystrokes. I'm very new to AutoHotKey, but I was wondering if there was some way to adjust the time between each keystrokes that it sends. Currently, the only line in my script is as follows:
^!k:: Send %clipboard%
I'd like to be able to increase the time between keystrokes (currently it seems to be on the order of about 50 characters per second) to more like 10 characters per second.
I'm using this to send keystrokes to a microcontroller using a terminal emulator. I'm having issues in that when I actually type in the keystrokes manually, everything registers as it should, but when I send the clipboard contents as keystrokes, something goes wrong, and I was hoping to slow down the rate of input in an attempt to pinpoint the issue. Essentially, I'd like to rule out the speed of input as an issue before attempting another more complicated solution.
If anybody has any ideas it'd be much appreciated. Thanks!
You can use this function
USING
Sendpersec(Clipboard, 10)
OR
Sendpersec("jdkfjdkjdfkjdfkjdfkdfjdf", 5)
FUNCTION
Sendpersec(Data, Chs){
sleeptime := 1000 / Chs
IfLess,sleeptime,1
sleeptime := 1
loop,
{
StringLeft,tosend,Data,1
Send, %tosend%
sleep,%sleeptime%
StringTrimLeft,Data,Data,1
IfEqual,Data
break
}
}
An easy way to increase the typing speed is to use SendInput
instead of Send
. This will "type" much faster ! Alternatively, you can store the string in ClipBoard and use Send, ^v
to send it.
Example:
Clipboard= Long string to type
Send, ^v
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With