Code: Select all
global foo := ""
Loop,1
foo.="o"
return
+F12::
QPC(1)
Send %foo%
TEST1 := QPC(0)
QPC(1)
tmp := Clipboard
, Clipboard := foo
SendPlay ^v
TEST2 := QPC(0)
Tooltip % TEST1 "`n" TEST2
return
QPC(R := 0) {
static P := 0, F := 0, Q := DllCall("QueryPerformanceFrequency", "Int64*", F)
return !DllCall("QueryPerformanceCounter", "Int64*", Q) + (R ? (P := Q) / F : (Q - P) / F)
}
and press +F12 rapidly, look at the content you just paste out, it randomly paste with same string but uppercase.
'oooooOOOO'
I try to solve this issue by myself.
I did try
(1). NOT WORK with ClipWait
Using ClipWait to force the script paste until the clipboard is not empty.
Code: Select all
tmp := Clipboard
, Clipboard := "" ; NOTE: This line is for ClipWait
, Clipboard := foo
ClipWait,4
SendPlay ^v
Using while loop to make a case-sensitive condition.
Code: Select all
tmp := Clipboard
, Clipboard := foo
while (Clipboard != foo)
{}
SendPlay ^v
Put a Increased Sleep depend on the foo's length with the Clipboard binding statement.
Code: Select all
tmp := Clipboard
, Clipboard := foo
Sleep 8 * StrLen(StrLen(foo))
SendPlay ^v
Can someone please help me out