[Looking for Maintainers/Successors] Clipjump : The Ultimate Clipboard Manager

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 09:55

RosePetalFactory wrote:Clipjump is FANTASTIC!!!! After snagging many things from articles, I open the Clip Manager, then select a few clips and use the Quick Paste by hitting the space bar. The only problem is, after going through all the options, plugins and even changing code, I see no way to add line breaks as clip separators. Instead, multiple clips are jumbled all together so that after pasting, who knows where one began and the other ended. Can I change something in the code that would allow for bookending each clip with the line breaks or text or anything really, of my choice? THANK YOU FOR THIS WONDERFULLY HELPFUL TOOL!!! What a labor of love it must be <3
Thank you. I should have missed that...
If you want to change code to add this feature, open lib/channelOrganizer.ahk
and go to line 382

Code: Select all

	loop, parse, rSel, `n
	{
		API.paste( Substr(A_LoopField, 1, Instr(A_LoopField, "-")-1) , Substr(A_LoopField, Instr(A_LoopField, "-")+1) )
		sleep 30
                ; keys to send here
		SendInput, {Enter}
	}
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
comvox
Posts: 19
Joined: 29 Sep 2013, 22:48

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 10:56

ClipJump is really excellent. Now that I have figured out a bit about how to make plugins, it is even more useful.

Below is a very minor quirk.

When one selects commonformats, there is a listbox with the names of the various plugins that are contained in commonformats. One can select a plugin with the mouse but one can also navigate this listbox with arrow keys or letters. There is the very minor problem that listbox navigation with arrow keys or letters is disabled when one gets to a plugin with two parameters, such as RegexReplace. This is because once one reaches such as plugin, the next keyboard input goes into the box labelled "input field". One can still select another plugin with the mouse though.

I have "fixed" this with a change to pformat.commonformats.ahk. In the routine under "zchosenformat:" I have commented out a line by putting a ";" in front of the line that sets the focus, as soon as one has reached a plugin with two parameters in the listbox, to edit3 (which is the zinputfield label section).

This solves the listbox navigation problem, but it means that once one gets to a plugin such as RegexReplace, one has to manually go to the input field. That's not a big deal either. That can be done with the mouse. Or one can navigate via tabs. But it takes a lot of tabs to get there. Well, one can use Shift-Tab to get directly to Edit3.
RosePetalFactory

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 11:35

All Hail Avi! Thanks for the tip! I tried your suggestion and other things...

rSel := "`n`nElephants Are Endangered" rSel "`n`n Lions are too"

loop, parse, rSel, `n
API.paste( Substr(A_LoopField, 1, Instr(A_LoopField, "-")-1) , Substr(A_LoopField, Instr(A_LoopField, "-")+1) )
API.paste := "`n`nElephants Are Endangered" . API.paste . "`n`n Lions are too"

; keys to send here
SendInput, {Enter}Hunting isn't so nice.{Enter}
return

=========This did add the Hunting isn't so nice to the end of the combined clips...but nothing was able to prefix and postfix each clip. I restarted Clipjump, recopied several snippets as such:

Snip1snip2snip3

Then I hit Shift+Ctrl+A and then O to open ClipJump Channel Organizer.

I saw my three snippets at the top indexed as 1, 2 and 3. I selected them all three at once, then pressed space, which combines them all and pastes them into the last active window, in this case, Notepad. Here's what I got:

Snip1snip2snip3
Hunting isn't so nice.

I want to access the clipboard text variable, and add to each snippet a custom prefix and suffix, like this:

Elephants Are Endangered
Snip1
Lions are too

Elephants Are Endangered
Snip2
Lions are too

Elephants Are Endangered
Snip3
Lions are too


============

I also looked into the API.ahk and tinkered, without success with the text variable assignment.

pasteText(Text){
this.blockMonitoring(1)
try
oldclip := ClipboardAll
Clipboard := "Prefix Text is Fun`n`n" . Text . "`n`nSuffix Text is even better."
this.blockMonitoring(0) , this.blockMonitoring(1) ;2 times cb change, so reset onclipboard var
sleep 100
Send ^{vk56}
sleep 100
Clipboard := oldclip
this.blockMonitoring(0)
}

============
I'm sure clipboard is assigned inbound or outbound to a variable to which I could add anything imaginable.
But where oh where? :-) Thank you AVI for being a friendly guide to the progammatically fumbling. :-)
comvox
Posts: 19
Joined: 29 Sep 2013, 22:48

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 12:30

RosePetalFactory, this is just a suggestion, but the following seems to work:

loop, parse, rSel, `n
{
API.PasteText("prefix stuff")
API.PASTE( SUBSTR(A_LOOPFIELD, 1, INSTR(A_LOOPFIELD, "-")-1) , SUBSTR(A_LOOPFIELD, INSTR(A_LOOPFIELD, "-")+1) )
API.PasteText("suffix stuff" )
}
Return
RosePetalFactory

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 16:04

Hi ComVox! I tried your intuitive looking code as included below:

PreFixVar := "`n What is the nature `n"
SuffixVar := "`n of Deceit? `n"

loop, parse, rSel, `n

API.PasteText(PreFixVar)

API.paste( Substr(A_LoopField, 1, Instr(A_LoopField, "-")-1) , Substr(A_LoopField, Instr(A_LoopField, "-")+1) )

API.PasteText(SuffixVar)


I copied 3 lines of text, each individually to its own snippet, and they lodged in slots 1-3. Those lines are below

1. Populism means truth and policy are herd driven.

2. Wolves in Sheep's clothing can be hard to spot...for some.

3. Are endless tombstones the by-product of peaceful teachings?

I opened the Channel Organizer and selected all three, then hit space. The results below, were unexpected:

What is the nature

What is the nature

What is the nature
Are endless tombstones the by-product of peaceful teachings?
of Deceit?

==================

It included the Prefix 3 times. Erased Clips 2-3. But did append the SuffixVar correctly.

Oh...we're close alright :-) Thanks for your help!
comvox
Posts: 19
Joined: 29 Sep 2013, 22:48

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 16:18

Hi RosePetalFactory. I think the problem is that you are leaving off the braces. If one has

loop, parse, rSel, `n
line1
line2
line3

Then only line1 is repeated throughout the loop. When the loop is done, then lines 2 and 3 are done.

By way of contrast,
loop, parse, rSel, `n
{
line1
line2
line3
}

will go through all three lines throughout the loop.
See if adding braces helps.
RosePetalFactory

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Nov 2015, 19:09

Sweetly Charming ComVox! You are now the hero of millions! My apologies for being waaaaaaaaaaay to drop-over sleeeeeepy. Of course the braces were the thing. Eeeek! But before I sleep, I want to thank you again and say this: AVI - this rich labor of love is so elegant, spectacular and salvific on the hands, we are all in your debt!! THANK YOU for making it open source and writing it in the Heaven-sent language of AutoHotkey !!
How long did it take you to write this...total hours invested so far?
Goodnight all!
VeganGod.org<3
comvox
Posts: 19
Joined: 29 Sep 2013, 22:48

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

22 Nov 2015, 10:09

RosePetalFactory, I'm glad the code worked, and trying to figure it out I learned a bit more about the functions of ClipJump. It has so many functions it's easy to overlook some! Indeed, many thanks to Avi.
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

29 Nov 2015, 03:33

RosePetalFactory wrote:How long did it take you to write this...total hours invested so far?
Goodnight all!
VeganGod.org<3
No idea.. I can give a rough estimate but I'm sure that would be way inaccurate..
comvox wrote:RosePetalFactory, I'm glad the code worked, and trying to figure it out I learned a bit more about the functions of ClipJump. It has so many functions it's easy to overlook some! Indeed, many thanks to Avi.
Glad you got them to use. Any suggestions to improve the docs or the software itself are welcome.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
RosePetalFactory

Feature REQ: COMPARE-Dedupe Clips MODE?

04 Dec 2015, 13:06

Checking text and files for DUPLICATES plagues many with busy work. WHAT IF ClipJump had a COMPARE MODE? When in compare mode, whatever text is copied is compared to the last 40 clips. If one is a duplicate a message pops up: DUPLICATE CLIP FOUND in Clip #12.

This would make checking paragraphs or even whole text files for duplicates QUICK, EASY and put the world even more in your debt AVI :-)

I now often use my custom version of ClipJump, which appends and prepends to clips, every day :-) THANK YOU!
DonkeysAreFriendly

ChannelOrganizer selections diret to Clipboard?

26 Dec 2015, 23:13

Merry Christmas Avi and ComVox! Is there a way to cause multiple clips selected in the ChannelOrganizer to be copied to the clipboard, instead of using send, which slowly sends the clips one character at a time?

I'm using your custom code here, placed around line 384 in channelOrganizer.ahk

Code: Select all

chOrg_paste:
	gosub chOrg_getSelected
	gosub chOrgGuiClose
	WinWaitClose, % TXT.ORG__name
	
	;rSel := "`n`nElephants Are Endangered" rSel "`n`n Lions are too"
	
	;LilBabyCounter := 0
	PreFixVar := "`n" LilBabyCounter "`n"
		SuffixVar := "`n"
	
	loop, parse, rSel, `n
		
	{
	LilBabyCounter ++
	API.PasteText(PreFixVar)
		
		API.paste( Substr(A_LoopField, 1, Instr(A_LoopField, "-")-1) , Substr(A_LoopField, Instr(A_LoopField, "-")+1) )
	;API.paste :=  "`n`nElephants Are Endangered" . API.paste . "`n`n Lions are too"
	API.PasteText(SuffixVar)
	; keys to send here
		;SendInput, {Enter}Hunting isn't {Enter}so nice.
	}
	return
comvox
Posts: 19
Joined: 29 Sep 2013, 22:48

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

27 Dec 2015, 22:01

Hi, DonkeysAreFriendly!

One problem with your code concerns the placement of the definition of PreFixVar. I assume you want the first clip preceded by a line with the number 1, the next one by a line with the number 2, etc. To achieve this, you should put the line defining PreFixVar

PreFixVar := "`n" LilBabyCounter " `n"

inside the loop, not preceding it. You could initialize LilBabyCounter to 0 before the loop. But then the line defining PreFixVar should go in the loop after the line "LilBabyCounter++", so that as the variable "LilBabyCounter" keeps getting incremented, that incremented number appears in PreFixVar. That way the number in the PreFixVar will keep getting incremented.

The point is that the line defining PreFixVar does not establish a lasting connection between PreFixVar and LilBabyCounter. It makes PreFixVar depend only on what LilBabyCounter is at the time that the line is executed. So if one wants PreFixVar to keep changing, as LilBabyCounter changes during the loop, the line defining PreFixVar has to be in the loop.
DonkeysAreFriendly

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

03 Jan 2016, 03:07

comvox wrote:Hi, DonkeysAreFriendly!

snip...The point is that the line defining PreFixVar does not establish a lasting connection between PreFixVar and LilBabyCounter. It makes PreFixVar depend only on what LilBabyCounter is at the time that the line is executed. So if one wants PreFixVar to keep changing, as LilBabyCounter changes during the loop, the line defining PreFixVar has to be in the loop.
Of course you are on the mark! You must sigh having to point out the obvious so often! :-) This is perfect ComVox - THANK YOU and Happy New Year!
Nick

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

11 Feb 2016, 23:28

Hi

Great work!
Lot of functions!
Great ideas (..., channels, action mode, ...) !

A few things could improve use of it even more.

1> Let user to set size for show clip
= It could be size of the font used for show a clip or ...

Why 1> ?
= If a clip is bigger, or if it has some spaces in it, or if some clips has similar beginning, or ...,
it can be hard to find/recognize the right clip.

2> Add XView Mode
USER:
= press a key for XView Mode
UTIL:
= go to XView Mode
= show N clips on the screen
= +show TopLine for status
= +show BottomLine for these functions info-help
USER:
= press PgDn/PgUp key
UTIL:
= show next/prev N clips on the screen
USER:
= press +/- key
UTIL:
= increment/decrement N (if N is lower then show size become bigger and vice versa)
USER:
= press I/O key
UTIL:
= let user to select input/output
= show first N clips (if input changed) on the screen
USER:
= LClick on a clip
UTIL:
= paste the clip
USER:
= RClick on a clip
UTIL:
= delete the clip
USER:
= press Esc key
UTIL:
= exit XView Mode

Why 2> ?
= If there are more clips, it is hard to find the right clip.

Nb> TopLine = InputName OutputName ClipNum ClipCount CurClipNum CurClipSize
Nb> Current Clip = a clip that have the mouse on it
Nb> BottomLine = Copy=LClick Del=RClick Move=LClick,RClick InputSet=I OutputSet=O ChangeN=+/- Exit=Esc

So, with 1> and 2>, it`d be much easier/faster to view/find/copy/move/delete a clip.

Best whishes!
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

19 Feb 2016, 16:23

No matter what this is a great application!

Nevertheless in the past I discontinued to use it, because it heavily interfered with scripts using repeatedly clipboard commands.
I tried all possible to make my scripts compatible, but I couldn't have got universal method.

However lately I tested newest version. It still interferes, but now is much better. Great improvements!

Why do you attempt to archive every clipboard. I would suggest to skip entries occurring in timeframe succession less then circa 0.66 second, or at least having an option to do that, besides a big pile of data is rarely helpful.
This lines could often make ClipJump to crash:

Code: Select all

Loop, 100000
{
  Clipboard := ""
  clipboard := A_Index
  ClipWait, 1
  if mod(A_Index, 100) = 0
    Tooltip, % clipboard
}
esc::exitapp
In the praxis is rather vice versa. ClipJump makes users script to stuck or the script must be radically slowed down.

When I decided to use ClipJump again, I made immediatly couple of modifications.:

Code: Select all

#If WinExist("ahk_class tooltips_class32")
^Esc::
#If
cancel:
Escape is hard wired in the brain!

Code: Select all

; SPM.X and y contain place to show a/c searchbox
	MouseMove, % A_CaretX - A_ScreenDPI/5, % A_CaretY + A_ScreenDPI/5
	tx := ini_pstMode_X ? ini_pstMode_X : SPM.X , ty := ini_pstMode_Y ? ini_pstMode_Y : SPM.Y
and for images the same.
At least in most editors I have help near by. But caret position could be determined in many more windows. ManiacDC did a great job. https://github.com/ManiacDC/TypingAid

I find tooltip a bit obsolete. Did you ever think about using Edit or ListView to display clipboard content? Finally you're already using GUI to display images.

You are using ToolTipEx to diminish fonts, I made the oposit.

regards!
Last edited by rommmcek on 20 Feb 2016, 10:11, edited 1 time in total.
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

20 Feb 2016, 00:07

rommmcek wrote:Why do you attempt to archive every clipboard. I would suggest to skip entries occurring in timeframe succession less then circa 0.66 second, or at least having an option to do that, besides a big pile of data is rearly helpful.
I also want to set up some logic or method wherein clips can be automatically deleted or not stored at all. Sadly I have got nothing that is idiot-proof and dependable.
rommmcek wrote: This lines could often make ClipJump to crash:

Code: Select all

Loop, 100000
{
  Clipboard := ""
  clipboard := A_Index
  ClipWait, 1
  if mod(A_Index, 100) = 0
    Tooltip, % clipboard
}
esc::exitapp
In the praxis is rather vice versa. ClipJump makes users script to stuck or the script must be radically slowed down.
This surely will make Clipjump crash. It won't be able to handle changing clipboards at that rate.

One thing that can be done here is to reserve shortcuts to copy/cut to clipjump, maybe win - c and win - v. ctrl - c and ctrl - v copy to windows clipboard . additionally I will also give some method to copy from windows clipboard to clipjump. And maybe a method to display what's currently on the Windows clipboard. This looks like a good idea. What do you think ?

Code: Select all

; SPM.X and y contain place to show a/c searchbox
	MouseMove, % A_CaretX - A_ScreenDPI/5, % A_CaretY + A_ScreenDPI/5
	tx := ini_pstMode_X ? ini_pstMode_X : SPM.X , ty := ini_pstMode_Y ? ini_pstMode_Y : SPM.Y
and for images the same.
At least in most editors I have help near by. But caret position could be determined in many more windows. ManiacDC did a great job. https://github.com/ManiacDC/TypingAid
regards!
I am not relying on caret because applications like Sublime Text create a false caret. There is no way to get their position.
I find tooltip a bit obsolete. Did you ever think about using Edit or ListView to display clipboard content? Finally you're already using GUI to display images.

You are using ToolTipEx to diminish fonts, I made the oposit.
I will also like to use a custom GUI for Paste Mode. Will try that sometime later.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

20 Feb 2016, 10:06

Hi,

Remapping Windows's clipboard shortcuts is a good idea. I was thinking about this solution too, besides I could imagine ClipJump having a copy, cut and paste function.
However quick consecutive use of clipboard commands is a delicate operation by itself anyway! So it would be hard to distinguish between script's and (or) ClipJump's failure.
My suggestion was to make ClipJump ignore frequent clipboard traffic.
Here is my basic proposal, which withstands the above crashing script:

Code: Select all

OnClipboardChange:
Critical
End := A_TickCount - Start
if (end < 666)
{ Start := A_TickCount
  return
}
ToolTip, % Clipboard, 0, 0
Start := A_TickCount
return
and to be less radical

Code: Select all

{ Start := A_TickCount
  n++
  if (n < 100) ;  already 10 is reliable, but ClipJump could use 1000!
    return
  else n := ""
}
It's ture, determining the caret is a flimsy task, but I still think ManiacDC has great solutions (see helper settings in https://github.com/ManiacDC/TypingAid).

Right now I noticed, that after starting ClipJump, current clipboard content (the one before starting the ClipJump) disappears.

bye!
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

20 Feb 2016, 11:00

rommmcek wrote:Hi,

Remapping Windows's clipboard shortcuts is a good idea. I was thinking about this solution too, besides I could imagine ClipJump having a copy, cut and paste function.
However quick consecutive use of clipboard commands is a delicate operation by itself anyway! So it would be hard to distinguish between script's and (or) ClipJump's failure.
My suggestion was to make ClipJump ignore frequent clipboard traffic.
Here is my basic proposal, which withstands the above crashing script:

Code: Select all

OnClipboardChange:
Critical
End := A_TickCount - Start
if (end < 666)
{ Start := A_TickCount
  return
}
ToolTip, % Clipboard, 0, 0
Start := A_TickCount
return
and to be less radical

Code: Select all

{ Start := A_TickCount
  n++
  if (n < 100) ;  already 10 is reliable, but ClipJump could use 1000!
    return
  else n := ""
}
Brilliant. Just what I was thinking. ( https://github.com/aviaryan/Clipjump/issues/103 )
It's ture, determining the caret is a flimsy task, but I still think ManiacDC has great solutions (see helper settings in https://github.com/ManiacDC/TypingAid).
I will see.
Right now I noticed, that after starting ClipJump, current clipboard content (the one before starting the ClipJump) disappears.
I am not sure how Clipjump should behave in that situation. Maybe add a setting and let user decide.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

21 Feb 2016, 23:07

It was less brilliant, when I tried to incorporate the script in the ClipJump.
But today I realised that ClipJump at start makes more then 45 OnClipboardChange routines.
So I made a makeshift solution. The scriptlet seems to work as expected and prevents ClipJump to crash.

Code: Select all

...
onClipboardChange:
	Critical, On

if (m < 59)
  m++
if m > 54
{ if (A_TickCount - Start < 100)
  { Start := A_TickCount
      return
  }
  Start := A_TickCount
}

	if !ONCLIPBOARD
	{
		ONCLIPBOARD:=1 	; if let blank, the label onclipboard quickly
		return
	}destroy
...
P.s.: Just didn't have time and nerves to determine exactly when the initialization is over.
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Clipjump : The Ultimate Clipboard Manager [Updated 9/11]

22 Feb 2016, 00:14

rommmcek wrote:It was less brilliant, when I tried to incorporate the script in the ClipJump.
But today I realised that ClipJump at start makes more then 45 OnClipboardChange routines.
So I made a makeshift solution. The scriptlet seems to work as expected and prevents ClipJump to crash.

Code: Select all

...
onClipboardChange:
	Critical, On

if (m < 59)
  m++
if m > 54
{ if (A_TickCount - Start < 100)
  { Start := A_TickCount
      return
  }
  Start := A_TickCount
}

	if !ONCLIPBOARD
	{
		ONCLIPBOARD:=1 	; if let blank, the label onclipboard quickly
		return
	}destroy
...
P.s.: Just didn't have time and nerves to determine exactly when the initialization is over.
The startUpComplete variable gets true only after startup routines are completed (including that 45 OnClipboardChange routines. ) It is also used in OnClipboardChange.

Code: Select all

onClipboardChange:
	Critical, On
	if !ONCLIPBOARD
	{
		ONCLIPBOARD:=1 	; if let blank, the label ends quickly
		return
	}
	ONCLIPBOARD := 1 		;used by paste/or another to identify if OnCLipboard has been breached
	if !startUpComplete 	;if not started, not allow - after onclipboard=1 as the purpose of onc is served
		return
	
	; clipboard limit stuff now
You can write your clipboard limiting code after this.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 253 guests