Saturday, January 19, 2013

ClipBinder - AutoHotKey Script

The problem:
 copying multiple segments of text and placing them in a different order in some other program. 

The Clipboard is a favorite and all but invisible, ubiquitous tool for any computer user. Without it, we all might as well be using typewriters. Clipboard however has a limitation in that its hotkeys only store one string of text ( or one picture). Sometimes you, as a computer user, need to do more copying than one element at a time. Sometimes you need to reorder your copied text.

With tax season forms and job applications it gets difficult to repeatedly reenter text. ClipBinder is my solution for copying off multiple segments of text.



Just save this AHK script and create a hotkey for it. The commands are fairly straight forward. Just launch it with a hotkey. Use control+C or your copy feature to copy up to four strings of text (sorry no pictures yet) and use the assigned hotkeys F9-F12 to paste the text at a later time. When you are done with all of them press Shift+Delete to close the script.
Now you have a Clip Binder of text instead of a Clipboard (get it?!?).



Copy the text between the lines and save as an AHK script. Don't forget to install Autohotkey first.
---------------------------------------------

;Stephen G Lobato
#SingleInstance ignore
SplashTextOn,300, 55,ClipBinder, Waiting...`nPress Shift+Delete to close
WinSet, AlwaysOnTop, Toggle, ClipBinder
Winmove, ClipBinder,,0,0
clipboard =
ClipWait
Item1 = %clipboard%
StringLeft, SITem1, Item1, 20
SplashTextOff
SplashTextOn,300, 35,ClipBinder, F9 = %SItem1% ...
Winmove, ClipBinder,,0,0
Clipboard =
Clipwait
Item2 = %clipboard%
StringLeft, SITem2, Item2, 20
SplashTextOff
SplashTextOn,300, 55,ClipBinder, F9 = %SItem1% ... `n F10 = %SItem2% ...
Winmove, ClipBinder,,0,0
Clipboard =
Clipwait
Item3 = %clipboard%
StringLeft, SITem3, Item3, 20
SplashTextOff
SplashTextOn,300, 75,ClipBinder, F9 = %SItem1% ... `n F10 = %SItem2% ... `n F11 = %SItem3% ...
Winmove, ClipBinder,,0,0
Clipboard =
Clipwait
Item4 = %clipboard%
StringLeft, SITem4, Item4, 20
SplashTextOff
SplashTextOn,300, 95,ClipBinder, F9 = %SItem1% ... `n F10 = %SItem2% ... `n F11 = %SItem3% ... `n F12 = %SItem4% ...
Winmove, ClipBinder,,0,0
Clipboard =
F9:: SendInput %Item1%
F10:: SendInput %Item2%
F11:: SendInput %Item3%
F12:: SendInput %Item4%
+Delete:: ExitApp

---------------------------------------------

No comments: