Creating area screenshot with CMD-Shift 4 using two found images?

Hi There.

I am trying to automate making screenshots of tables in MS Word. Since I have a lot of these tables of varying sizes to make I want to be able to just fire off a macro that makes a screenshot of the table with the same border around the table in the screenshot.

I have created a macro that triggers the area screenshot with CMD-Shift-4, clicks on the top left border of the table and then drags to the bottom left corner.

This works as expected (I can see the MacOS screenshot utility selection crosshair move to the top left and then to the bottom left corner) but no screenshot is created.

Here is a zip archive with the macro and a sample word file: (19.0 KB)

I've played around with the ScreenCapture Area component as well but that only copies the screenshot to the clipboard and I then have to paste it into an image editor and save the file. WIth CMD-Shift-4 it would arrive in my current screenshot directory automatically.

What am I missing ?

PS: I'm on Catalina with KM 9.1

Hey @mummel,

As I recall automating dragging an interactive screenshot is problematic.

You don't need to paste the image – just write the file to the directory of your choice with the file name of your choice using the Write to a File action.


hi @ccstone
many thx for your tip. There is one problem i'm encountering with the Screengrab/writetofile technique:

Here's what's working at the moment but can't figure out the automatic file numbering, for the moment i got it to work using the time and then renaming the files manually in the finder but it would be cool if i could generate files named table-x.png or sth like that, but i'll get there eventually :slight_smile:, i've seen there are some threads in the forum on how to do it

Screenshot 2021-01-19 at 10.34.48

Hey @mummel,

Can you be more specific about the output format you want?

Do you want to auto-generate the name? Or do you want a Prompt for User Input action to allow you to enter something manually.

Date-stamp is the easiest means of serialization, but there are other ways of course.


Hey there, honestly after having done a couple of hundred today it's totally fine by using the finders rename feature which only take a second and also gives me a moment to doublecheck the files.

I don't want a prompt but at one point i was thinking of auto generating the name via OCR since some of the tables are split up into several tables, so i wanted them named with the table number and a counter at the end, sth like table1_a.png, table1_b, table2_a, table2_b.png etc. But not all tables have names on the pages i'm taking the screenshot from so that won't work.

In the end the current workflow is super fast and as i said, the finder rename only takes a moment and give me the oportunity for QC at the same time.

Always amazed of all the things KM can do, it's really one of the greatest pieces of Mac software around :grinning: Shaved at least a couple of hours of work away this week with this.

Thx for your help Chris .. my name's Chris as well btw :stuck_out_tongue_winking_eye:

1 Like