^!space::
@:=Clip()
RunWait, Everything.exe, %A_ProgramFiles%\Everything\
Clip(@)
return
Clip(Text="", Reselect=""){ ; http://www.autohotkey.com/forum/viewtopic.php?p=467710 , modified February 19, 2013
Static BackUpClip, Stored, LastClip
If (A_ThisLabel = A_ThisFunc) {
If (Clipboard == LastClip)
Clipboard := BackUpClip
BackUpClip := LastClip := Stored := ""
} Else {
If !Stored {
Stored := True
BackUpClip := ClipboardAll ; ClipboardAll must be on its own line
} Else
SetTimer, %A_ThisFunc%, Off
LongCopy := A_TickCount, Clipboard := "", LongCopy -= A_TickCount ; LongCopy gauges the amount of time it takes to empty the clipboard which can predict how long the subsequent clipwait will need
If (Text = "") {
SendInput, ^c
ClipWait, LongCopy ? 0.6 : 0.2, True
} Else {
Clipboard := LastClip := Text
ClipWait, 10
SendInput, ^v
;~ Send %Clipboard%
}
SetTimer, %A_ThisFunc%, -700
Sleep 20 ; Short sleep in case Clip() is followed by more keystrokes such as {Enter}
If (Text = "")
Return LastClip := Clipboard
Else If (ReSelect = True) or (Reselect and (StrLen(Text) < 3000)) {
StringReplace, Text, Text, `r, , All
SendInput, % "{Shift Down}{Left " StrLen(Text) "}{Shift Up}"
}
}
Return
Clip:
Return Clip()
}
Если не отпустить модификаторы, вставка буфера не срабатывает.
Подскажите, что нужно изменить, чтобы избежать такого конфликта?