Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to create a mini Clipboard Manager using AutoHotkey?


  • Please log in to reply
4 replies to this topic
victorzale
  • Members
  • 2 posts
  • Last active: Jul 29 2009 06:16 PM
  • Joined: 29 Jul 2009
Here is my wish list for an Autohotkey script. I would like to setup just 3 or 4 key combinations, so that when I select/copy Text with hotkey#1, it saves the text to a variable etc. Then I need a 2nd hotkey to Paste the text from Hotkey#1 again. And so forth for each piece of text that I copy, save to variable #2, #3, etc, and then paste elsewhere with hotkey #2, #3, etc.

Of course, what would be even cooler is if you could somehow just use the standard Ctrl-C command, BUT each time you use it, it would automatically save the text to Variable 1, 2, 3, etc. and then have some way to paste the contents of each variable back via a keystroke.

Is this particularly practical within Autohotkey, or should I be looking at some kind of actual dedicated clipboard manager utility, any recommendations? Ideally I would like something that is all key-stroke driven for speed's sake, rather than picking the text out of a looong list.

Thanks in advance!

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
There are many clipboard scripts in the forum, try a few <!-- m -->http://www.autohotke... ... nipulation<!-- m -->

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
My personal favorite is Deluxe Clipboard.

philu
  • Members
  • 15 posts
  • Last active: Jan 21 2016 06:34 PM
  • Joined: 28 Aug 2012

why not try it yourself.

(old thread, I know, and I don't care.)

 

The following script does not modify your clipboard AT ALL.

It JUST and ONLY gives you the opportunity to access your last five TEXT clipboard entries by pressing ctrl+shift+c

~^c::
sleep, 100
if clipboard = ""
{
	; it's a picture, file etc.
	return
}
if clipboard = %clpb1%
{
	; already exists, stay in slot 1
}
else
{
	; new content
	clpb5 := clpb4
	clpb4 := clpb3
	clpb3 := clpb2
	clpb2 := clpb1
	clpb1 := clipboard
}
; finally
clpb1len := StrLen(clpb1)
StringTrimRight, clpbs1, clpb1, clpb1len - 50
clpb2len := StrLen(clpb2)
StringTrimRight, clpbs2, clpb2, clpb2len - 50
clpb3len := StrLen(clpb3)
StringTrimRight, clpbs3, clpb3, clpb3len - 50
clpb4len := StrLen(clpb4)
StringTrimRight, clpbs4, clpb4, clpb4len - 50
clpb5len := StrLen(clpb5)
StringTrimRight, clpbs5, clpb5, clpb5len - 50
tooltip, 1: %clpbs1%`n2: %clpbs2%`n3: %clpbs3%`n4: %clpbs4%`n5: %clpbs5%
sleep, 1000
tooltip
; }
return

^+c::
clpb1len := StrLen(clpb1)
StringTrimRight, clpbs1, clpb1, clpb1len - 50
clpb2len := StrLen(clpb2)
StringTrimRight, clpbs2, clpb2, clpb2len - 50
clpb3len := StrLen(clpb3)
StringTrimRight, clpbs3, clpb3, clpb3len - 50
clpb4len := StrLen(clpb4)
StringTrimRight, clpbs4, clpb4, clpb4len - 50
clpb5len := StrLen(clpb5)
StringTrimRight, clpbs5, clpb5, clpb5len - 50
inputbox, clpbNbr, which clipboard number do you want to have in your clipboard now?, 1: %clpbs1% 2: %clpbs2%`n3: %clpbs3% 4: %clpbs4%`n5: %clpbs5%`n
if errorlevel = 1
	return
clipboard := clpb%clpbNbr%
return


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
how-to-make-a-script-that-can-copy-multiple-strings
Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About