How to copy multiple items and paste them in the same order they were copied

I have about 20 illustrator files where each has between 10 to 30 text layers. I need to copy each text layer into TextWrangler and I don't want to do it manually one by one.

Having said that, there is no way to automate the copying of all text layers from Illustrator because they are not in an order where I could use a shortcut to navigate through them. So I'm ok doing this part manually.

Here's how I'd like it to go:

  1. Manually select a text layer in Illustrator
  2. Press a shortcut so KM will collect it in a clipboard

I will repeat the 2 steps above over and over until I have collected all text layers in the clipboard. I would then switch to TextWrangler where with the press of another shortcut KM would magically paste all the layers (in the same order as I copied them).

I read the documentation about Clipboards here as well as this and tried building a Macro but I don't really understand what I'm doing.

It sounds like I can create a clipboard in KM and name it but I don't fully understand how to call it up and then use it to paste all it contains as I described above.

I also still don't understand what the Clipboard History Switcher exactly is. Is it just another clipboard? What's the difference between it and a Named clipboard?

I also noticed that KM puts 2 things in the Clipboard History Switcher is there a way to have it only put 1 item as plain text?

Sorry for any stupid questions. Any help would be really appreciated as I need to hit a deadline.

Thanks in advance!

  • Xavier
1 Like

I have a pair of macros that does almost exactly what you are asking for.
However, it might be much later tonight, or tomorrow, before I have an opportunity to upload these macros.


I have a macro for a similar task - copy / paste last three clipboard records.
You just need to copy three parts of your text and then run the macro three times so it will paste clipboard records one by one exactly in copied order.

1 Like

I know it's not KM, but if you are using LaunchBar, you can use the Command+C C to append to the current clipboard. That way you just append for all your text in one file, paste it in TextWrangler (or BBEDIT). Not sure if Alfred got this little trick in it too.

Thanks Jeff,

I tried LaunchBar but for some reason, the Command+C C shortcut doesn't always work. In other words, sometimes I hear the sound (the one it makes when it has successfully appended) but sometimes I don't. I got excited though as I thought this would be the answer to my need :confused:

Not sure what causes it to intermittently fail.


You could write a macro that appended the select to the clipboard. So something like:

  • Copy
  • Set Clipboard to Text "%PastClipboard%1%%SystemClipboard%"

You might like to include some sort of break between the items depending on exactly what you are doing (this is why it's not native in Keyboard Maestro because who knows what break you want between them).

Then just copy the first item, and use your macro for each of the rest, and then Paste.

You can try this one.

It asks you the number of clips you want to paste. You can paste up to 11 clipboards. The clips are separated by return. But, you can adopt that.

it is not a brilliant macro: but it served me well.

PasteClips.kmmacros (16.3 KB)

1 Like

That would work for text, but not if the clipboard contained images, videos, etc.

It would work for styled text containing such, but yes, it would not work for varied content.

For that you would probably just copy each item and then paste them back in in turn from the clipboard history.

That seems easy enough. I'm just about ready to publish my macro that handles:

  • Text and images
  • Paste manual one at a time, or all at once
  • Allow user-selected separator
  • Based on capturing clips with another macro, or, just paste the last N clipboards in order.

Just a bit more testing before I'm convinced it's ready. :wink:

1 Like

Thanks to all for your replies. Because of time constraints, I wound up using a small program called Copy'em Paste. It allows me to copy as many items as I want. Once all the Illustrator text layers are copied I simply select all the items in the Copy'em Paste window and drag them over the TextWrangler document. and Voila!, they are pasted as plain text. Which is what I need.

I will test all your suggestions once I have more time.


I just uploaded a set of macros that do exactly that.

MACRO: Paste In Order Copied

I know you have found another solution, but this is another option for you and others who don't want to get/use yet another clipboard manager. :wink:

If you're interested and have a chance, let me know how you like my macros, including any suggested changes.

1 Like