Code: Select all
z::
;hold true clipboard
;copy selected text to a variable
;revert true clipboard
Return
x::
;hold true clipboard
;replace the clipboard with the saved one
;paste
;revert true clipboard
Return
Thanks
Code: Select all
z::
;hold true clipboard
;copy selected text to a variable
;revert true clipboard
Return
x::
;hold true clipboard
;replace the clipboard with the saved one
;paste
;revert true clipboard
Return
Code: Select all
^#1:: ;store selected text as variable
^#2::
^#3::
^#4::
^#5::
vNum := SubStr(A_ThisHotkey, StrLen(A_ThisHotkey))
ClipSaved := ClipboardAll
Clipboard := ""
SendInput, ^c
ClipWait, 3
if ErrorLevel
{
MsgBox, % "error: failed to retrieve clipboard text"
return
}
vClip%vNum% := Clipboard
Clipboard := ClipSaved
ClipSaved := ""
return
^1:: ;paste variable
^2::
^3::
^4::
^5::
vNum := SubStr(A_ThisHotkey, StrLen(A_ThisHotkey))
ClipSaved := ClipboardAll
Clipboard := vClip%vNum%
SendInput("{Shift Down}{Shift Up}{Ctrl Down}{vk56 Down}") ;vk56 sc02F
vWait := 3000
vStartTime := A_TickCount
Sleep, 100
while (DllCall("user32\GetOpenClipboardWindow", Ptr) && (A_TickCount-vStartTime < vWait))
Sleep, 100
SendInput("{vk56 Up}{Ctrl Up}") ;vk56 sc02F
Clipboard := ClipSaved
ClipSaved := ""
return
Users browsing this forum: No registered users and 400 guests