-
-
Save jasondavis/66cb2fab7c1cea86cf3fc0d4b0de8a68 to your computer and use it in GitHub Desktop.
Clipboard Queue - Keep multiple clipboards at the ready or paste them in a sequential order!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
___ _ _ ____ | |
/ __\ (_)_ __ /___ \_ _ ___ _ _ ___ | |
/ / | | | '_ \ // / / | | |/ _ \ | | |/ _ \ | |
/ /___| | | |_) / \_/ /| |_| | __/ |_| | __/ | |
\____/|_|_| .__/\___,_\ \__,_|\___|\__,_|\___| | |
|_|coded by errorseven @ 8/26/2016 | |
Usage: | |
Ctrl + V Pastes based on Mode and contents of your ClipQueue | |
Ctrl + < Move Queue Pointer Left | |
Ctrl + > Move Queue Pointer Right | |
Ctrl + Alt + M Select used with Pointer, Queue Pops 1st Element Queue. | |
Ctrl + Alt + X Clear ClipQueue | |
*/ | |
clipQueue := [], p := 1 | |
clipPrevious := "" | |
Mode := "Select" | |
setTimer, checkClipboard, 100 | |
$^v:: | |
setTimer, checkClipboard, Off | |
if (Mode == "Select") | |
clipboard := clipQueue[p] | |
else if (Mode == "Queue") && (clipQueue.length()) | |
clipboard := clipQueue.removeAt(1) | |
send, {Ctrl down}v{Ctrl Up} | |
clipboard := clipPrevious | |
setTimer, checkClipboard, On | |
return | |
^!m:: | |
Mode := Mode == "Select" | |
? "Queue" | |
: "Select" | |
TrayTip, Mode, % "Set to " Mode,,500 | |
return | |
^!x::clipQueue := [] | |
^,:: | |
p := p > 1 ? p - 1 : clipQueue.MaxIndex() | |
tooltip, % clipQueue[p] | |
SetTimer, RemoveToolTip, 500 | |
return | |
^.:: | |
p := p < clipQueue.MaxIndex() ? p + 1 : 1 | |
tooltip, % clipQueue[p] | |
SetTimer, RemoveToolTip, 500 | |
return | |
checkClipboard: | |
if (clipboard != clipPrevious) { | |
clipQueue.push(clipboard) | |
clipPrevious := clipboard | |
p := clipQueue.maxindex() | |
} | |
return | |
RemoveToolTip: | |
SetTimer, RemoveToolTip, Off | |
ToolTip | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment