Copy Screenshot area to clipboard and at the same time save a file of the same screenshot

On the Mac, I know I can copy a selected area screenshot to the clipboard or save selected area screenshot as a file. I was wondering if there is any way a Keyboard Maestro macro would enable me to do both at once - i.e. when I drag to select an area of the screen - that area is saved to a file and simultaneously copied to the clipboard. Does anyone know a way of achieving this?

Hi @Zabobon, maybe this will help you? The advantage would be that you can save the screenshot anywhere.

Hey Mark,

Sure.

Screenshot to Clipboard and File.kmmacros (5.0 KB)

You can change the file format, and you can get pretty fancy with file-path and file-name if you want.

-Chris

Hi Chris - that is absolutely great. I have been trying to work out how to do this for ages.

There is just one problem with the macro for my needs - it overwrites the saved file each time, whereas I want to keep each saved file. Would there be a way to add an incremental number to each saved file?

The reason I have been trying to get this scenario working is that sometimes I capture and paste the image . Other times I want to save files and what I am looking for is a way to do both at the same time - be able to quickly paste the image but still have all my screenshots backed up in a folder.

Sorry, I should have specified this before but I wasn't even sure if there was a solution.

Actually, I think I have found a solution to the incremental file thing. Just adding in a Keyboard Maestro text token after the generic file name to add the current date and time to the file name will keep each file and give it a unique name. There is a Keyboard Maestro token for adding in a date and time with any ISO format -

%ICUDateTime%EEE, MMM d, yyyy%

I will play around with this. If it works I will link to the adapted macro in case it is of use to others.

Thanks again for your help with this.

Mark

Yes, adding in the token to the file name worked great. Thank you again for making this macro. Here is the adapted one in case others would like to use it.

The exact tokens and text I added to the file name were:
%ICUDateTime%yyyy-MM-dd% at %ICUDateTime%HH-mm-ss%

making the whole file name:

~/Desktop/Your_File_Name-%ICUDateTime%yyyy-MM-dd% at %ICUDateTime%HH-mm-ss%.jpg

Mark :slight_smile:

Screenshot to Clipboard and File date time.kmmacros (5.0 KB)

2 Likes

Hey Mark,

This is what I meant by getting fancy.  :sunglasses:

Good job on figuring it out.

-Chris

Thanks Chris and appleianer. Keyboard Maestro is such an amazing app don't you think? It is now the first app I install when I setup a new Mac.

2 Likes

Hey Mark,

A Mac without a few good automation utilities is about as useful as a balsa wood boat anchor.

I'd be fairly lost without these (in approximate order of importance):

Keyboard Maestro & FastScripts
Typinator
LaunchBar
1Password
Default Folder
Moom

iStat Menus (information rather than automation).

I feel crippled if I have to work on a Mac without them.

-Chris

@ccstone, did you ever try Alfred ? If so, what were your thoughts regarding Alfred vs LaunchBar ?

Hey @CJK,

I've used LaunchBar since around 2003, so I've got a lot of muscle-memory invested.

I've tried Alfred but never liked it enough to buy the Power Pack (which is where the real functionality is).

If LaunchBar wasn't around I'm sure I'd be using Alfred.

Comparing the two I'd say each has its strengths and weaknesses, but I haven't seriously evaluated Alfred in a long while.

-Chris

You and others might be interested in these topics:

1 Like