Create spikes that capture N-items; paste back with specified separators;

Looking for some tips on how to accomplish the following workflow: I would like to review my notes and compile a collection of text snippets and images from various applications and have this collection of content captured to a “running clipboard” (eg a spike). When I’m done filling this clipboard I would like to paste the contents of this clipboard into another application (Word, Evernote, Mail, etc) with the contents pasted in a FIFO order separated by a specified delimiter, eg, 2 returns. I would like the paste event to clear my “spike” so I can start another round of collection. I can see that KM supports multiple clipboards but I can’t see a way to access these clipboards as an indexable container that I can add to and paste from. Suggestions appreciated.

There is no particularly good way to append generic clipboards. You could use a named clipboard, but that wont necessarily work well with all clipboard formats, and in particular it wont work with images - styled text clipboards can contain images, but I don't know any way to convert an image into a styled text containing an image, which you could then include in your named clipboard, something like this:

So the only way I know to do it is basically as described in the example in the documentation tour.

Hey bdurham,

Mixing and matching plain-text, styled-text, and images is not exactly simple.

Off the top of my head I can think of two basic ways to go about this other than Peter’s method.

Use Keyboard Maestro’s own Clipboard history by starting the spike and keeping a running tally of all cuts and copies. Then loop through and paste from past-clipboard-# to past-clipboard-#.

OR

Have a macro copy/cut and then write the clipboard to a file in a Spike-folder. From there you have several options to get the data back into an application.

If you want them sequential you could prepend a date/time stamp.

-Chris

If you can get by with just text (no images), you might look at LaunchBar. It is enormously useful, and has an excellent clipboard scheme that includes what the developer calls ClipMerge. Holding ⌘ down while pressing {c} twice in rapid succession (default setting, customizable) appends the current selection to the current clipboard. Pasting from the clipboard then pastes all the clipped selections ("spiked" — also "spindled") in FIFO order, with the items separated by returns.

Using ClipMerge with the KM Clipboard History Switcher window open, I see that Launchbar's ClipMerge does two things: creates a new clipboard entry for the selected text, and then creates a second new entry, combining the last two.

I feel like a grasshopper here, but ... isn't that easily done and effective? One would have to open the Clipboard History Switcher window and count the items to be pasted, but the rest is simple, no?


(I find I a_always_ have to add some Pause Actions to make my KMacros work. Some may not be needed, many can likely be shortened.)

Is there any way to determine — and get — the ordinal index of a clipboard history item? Or the number of items in a named clipboard history stack?

Hey Kirby,

That's the general idea.

I'd probably use a macro to mark the beginning of a spike and iterate every time the clipboard changed, so the paste macro would automatically know how many items to paste and cancel the other macro.

In theory – not tested.

You can serial-paste from LaunchBar, and that's what I normally do. You can bring up the clipboard-list, select only the items you want, and then Cmd-Shift-C to copy & paste — or you can paste one at a time serially which deletes each successive item from the top of the stack.

It's not awesomely versatile, but it does most of what I need.

I use Keyboard Maestro Clipboard-History to hold more items than LB does and to do more literal searches.

-Chris

1 Like

Thanks For the suggestion :blush: .

Yes — me too. I have no need to delete items, so I just get what I need and move on.

If you set LB Clipboard prefs to one week, it will keep as many items as you clip (afaict — I just counted 254 items in my history). A week seems a quite functional retention duration.

I'm not sure what you mean by "literal". I think that's all LB can do — and does it well (since literal string-searching is the heart of the app).