Copy non-stop 1 by 1 into a list

Copy once, paste once
Copy once, paste once
Copy once, paste once

A lot of window switching. This wastes time.

How to do batch copy (still copy 1 by 1, but at least I don’t have to switch windows)
and the pasting gets done in background to a certain clipboard?
Then I could access the clipboard later on ALL AT ONCE, LATER

If I have 10 browser tabs open:
Command + C to copy browser URL 1
Next tab
Command + C to copy browser URL 2
Next tab
Command + C to copy browser URL 3
Next tab

Command + C to copy browser URL 10
Next tab

In the end, there’s a list of 10 URLs already pasted into a clipboard or text file somewhere.

How to do this in Keyboard Maestro?

Searches for ‘append to clipboard’ should yield a few KM macros

KM maintains a clipboard history. So, even without any special technique you can always paste from the history, without the need to switch back and forth between windows or applications.

Then, as @ComplexPoint has pointed out, you have the possibility to append to the clipboard, which afterwards lets you paste all in one step, without displaying the clipboard history. Probably this is what you are looking for.

Another possibility is to copy normally, and then use a macro that pastes and deletes the current clipboard. This way you can successively paste from the history (in reverse order) without displaying the history.

(If you are using LaunchBar you may know this as “ClipMerge” respectively “Paste and remove from history”.)

1 Like


I do this all the time, and it works well.

Hey @ciprobay,

Well, first of all don't do that to get URLs (if you're using Google Chrome or Safari.

AppleScript does the job far better.

This is for all windows in Safari but could easily be limited to the front window.

set AppleScript's text item delimiters to linefeed
tell application "Safari"
   set urlList to URL of tabs of windows
end tell
set urlList to urlList as text
set urlList to do shell script "sed '/^$/d' <<< " & quoted form of urlList

For appending text to a file you can something like this:

Append to Text File.kmmacros (2.5 KB)

Create a companion macro to open the text file in TextEdit, TextWrangler, BBEdit, or other text editor.

BBEdit runs 24/7 on my system, so I generally use it for such things.

I use a macro similar to this one to make bookmarks for the front page in Safari, but I use LaunchBar and Keyboard Maestro's Clipboard History for most copy/copy/… ⇢ paste jobs.

You can do all kinds of things with this type of macro.


All you guys are programming geniuses!

Thanks for the ideas.
So many ways to do it.
I ended up using this

Video Demo:


Just curious: does the “Simulate 2 deletes before executing” not work for you?

Oh shoot!

Good point, brb, gonna fix all Keyboard Shortcuts macros now!