Chrome print selection only

Hello, I often select text in chrome and want to print the selected text only.
The first step is easy: Cmd-P
On the first print dialog box, I have to click on More Settings.
On the next dialog box, I have to scroll down and check Selection only, and then Print.
How should I approach this problem if I want to create a Macro?
thanks very much

You need to use interface control for this and just click and send keystrokes to make it work. Try this macro. You may need to mess with the Pause delays on it - Chrome's print dialog takes some time to respond. There may be some Chrome plugins that give you want you want, too.

Print Selection in Chrome.kmmacros (5.3 KB)

1 Like

thanks very very much for taking the time to create a macro.

I am very grateful. In addition the macro has a lot of educational value.

Unfortunately, it does not work. The end result is as if I had pressed Cmd-P

I am not sure how to debug it. I will start by inserting long pauses, and keep you posted

thanks again

I found the problem by putting as you suggested long pauses (10 seconds).
Everything works fine except that you click on two-sided instead of selection only.
The second move and click needs to be adjusted.
that being said, it was beautiful to see your macro in action, in slow motion.
thanks again

how do you measure the Move and Click coordinates?
thanks

I used the recording feature.

1 Like

where would I find that? thanks

what do you suggest I do, to go down from Two-sided to Selection Only?
thank you

You are probably better off using a Chrome extension. There are a number of interesting printing extension in the Chrome Web Store. Some of them offer more than just printing the selection. I have used the following off and on for quite a few year.:

You could also use the Evernote Web Clipper (if you use Evernote) for this, though indirectly, by clipping the selection then finding it in Evernote and printing it. Not worth it unless you actually want to save the clipping.

1 Like

Get to the print menu where you want it to be (so with page down done and
everything else), Click “record”, and then click on the right square. Note
that if your chosen printer doesn’t have a 2-sided option (which,
presumably, is why mine didn’t show the option when I recorded it), the
position of that checkbox will change.

You might also want to check out these extensions, all of which claim to be
able to assist with printing part of a web page/the selection:

https://chrome.google.com/webstore/detail/print-extension/bpkeigdcgenbnkhgepkihlgfabkhdong?hl=en
https://chrome.google.com/webstore/detail/print-selection/gbkdpdnociibpkkpjgmcmdlnjlebpajk?hl=en-US&gl=US
https://chrome.google.com/webstore/detail/print-edit/olnblpmehglpcallpnbgmikjblmkopia?hl=en-US

1 Like

I will look into it. thanks
Last time I looked, each extension had some quicks.
I will look again

No doubt :-). Print Selection is 4 years old, and I have to admit to not having used it recently. Print or PDF… is 2 years old. Print Friendly is actively maintained, I think, but I just realized that although it cleans up the page and saves a lot of clutter (and paper) in your printouts, it doesn’t actually support printing just the selection.

By the way, developer provides versions of Print Friendly for multiple browsers and platforms. His Safari version is a bookmark, not an extension, so it has to go on your bookmark bar.

1 Like

Sorry, I am totally confused. What ‘record’ ?

Ah, the “record” button will, well, record everything you do so that you
can play it back. Very handy.

https://www.keyboardmaestro.com/documentation/7/recording.html

1 Like