Screencapture: Give it a name and save it in a folder

Hello maestros,

Try to make a screen capture and save it under an assigned name (KARMA01, KARMA02 ...) combined with date and time in a folder of my choice on the desktop.

If I got the action "screen Capture" right, I can only save it on the clipboard?

I have not found the clipboard with the Finder (just when I click on "New" in the "to" pulldown-menus, a window "Preferences: Clipboard" pops up, that I cannot handle; is it part of km or part of my system?).

So my question is: is it possible to save my captures right in the folder I want to (like in the Automator shell script I have attached (in german, I can translate if necessary) or does it go first to the clipboard and I have to find an action that copies the captures in my folder from there, like described in a topic similar to my problem but for know beyond my capabilities).

Any help welcome.

Greetings, vierviervier

Karma 01 Macro (v11.0.1)

Karma 01.kmmacros (18 KB)

Keyboard Maestro Export

I like that name! Thanks.

I believe you are right. But you can save it in other clipboards, not just the main one.

You can easily write the clipboard to a file. I do it like this:

If you use my action above, you can save the clipboard immediately, but it's in a separate action.

I suppose you could do it all in one action if you used one of the KM actions that executes a shell script or executes a macOS shortcut, but I'm not sure it's any faster. It would be in a single action. Why do you need it to be in a single action? What's wrong with two actions?

This is how I would do that:

Screenshot - Name and Save.kmmacros (42 KB)

Macro screenshot

I omitted the date and time part, as it's unnecessary. The date and time are visible in the Finder and the incremented number takes care of files being uniquely named.

Hello Airy,
Thanks for your help.
No, nothing wrong with two steps, just result is counting.
You and noisneil go the same way, as far as I can read it, so I will try.
Greetings, vierviervier

Hello noisneil,
thanks for your sophisticated answer to my question.
It looks like exactly what I need (just guessing, cause at the moment its more like chinese).
I will try to implement it in my programm and work my way through the details.
Be prepared to hear some naive questions.
Greetings, vierviervier

1 Like

had a sleepless night thinking about all the modifications that I have to make in a Chinese text to get it applied to my system.
Copied your macro in mine, let it run just to see when it stoped working ... and it went right through.
Just litte adjustments left:
At the end the macro should make screenshots from different objects (1 to 8) in the "Where is" app one after another, then pause 15 minutes, then restart again making screenshots (I've expanded the macro for one more round, just to show what I mean).

So for analyzing the screenshots later on, it would be nice, if I could arrange the files by filenames, so that first came all screenshots from object 01 and the screenshots from object one are arranged first by date then by time.

So the perfect file name to arrange the screenshots this way, would be:

(Name of the object_Year_Month_Day-Hour/Minute/Second)

This is part of the increment filename action I guess, which is the most Chinese part of the macro for me.

So if I would get one cycle perfect, I guess I'm able to copy ti, make the litte adjustments (like changing the name of the object) necessary an finally ad a loop to it.

For the one perfect cycle, help would help me a lot!

Thanks and greetings,


Karma 02.kmmacros (42.3 KB)

Is this the name of the app? I would need to have it in order to help you further.

"whereis" is a universal shell app that tells you the folder where a filename is stored.

Is this what you're referring to? I'm a little confused by the wording of your post.

I'm german, sorry, if some parts of my text are difficult to understand - try my best. Please ask for I try to improve my undertandability.
The app I refer to is named "Wo ist?" in german, its the one you use to get an overview where your Airtags, Iphones etc. are.

1 Like

What is your ultimate aim here? Please spell it out clearly without focusing on the current method you're investigating. The reason I ask is that there may be a better alternative to taking screenshots and analysing them, depending on what it is you’re trying to do.

I have a problem with packages that do not arrive at the destination.
To solve this problem, i use air tags to send with, to know the position of the packages.
The app to get the position of the air tags is called "Wo ist?" in German, but the englisch name is not "Where is?", as I've written, but "Find my".
For that I can't be 24hours watching the app to check the positions, I try to build this macro, that gives me every quarter hour a screenshot and puts the files in a meaningfull order.
For checking the way of a parcel, I have than a list with all the files, arranged by name, so that there are first the scrennshots of Air Tag 01 in chronological order, than Air Tag 02 ...

Hope I could have made my aim clear enough, will answer needed specifications anytime.

And by the way: thanks for your help! It's very new territory here for me but feel quite guieded.

Sounds expensive!

If you're naming each screenshot so comprehensively, I would suggest that the incremented number function is unnecessary, as the file names will always be inherently unique.

It's going to be quite tricky for anyone to help you with this, as they won't be able to test it without sitting next to you at your mac.

Having said that, we can start by outlining the logic:

  • Chron trigger: every 15 minutes
  • Open Find My... app
  • For each airtag:
    • Select airtag
    • pause until location is displayed
    • take screenshot and name accordingly
  • Close Find My... app

The hard bit, as I see it, is selecting the packages in the app. You'll have to decide on a method for selecting each airtag in the interface and this may require knowing its name.

I'm going to struggle to get into the weeds on this one as I don't own any airtags, but perhaps you could supply some suitably redacted screenshots to give us an idea of the available options.

I've already written an app that does this. Rather than Airtags, I was using iPhone locations in the Find My App, which is pretty much the same thing. It was very tricky. Specifically, my app monitors the location of my family's location and when the text string that describes their location changes, I get a Message appearing on my Apple Watch. I stopped it because I was getting notified too often when one of them was "on the move." For example, my sister was driving along a highway and every 500 meters the "location" changed resulting in another Message.

The main downside to my solution was that once I started the monitoring, my app required permanent screen access, which meant I could no longer use my Mac for anything else. So I stopped using it. And I felt creepy monitoring every movement of my family.

My app might work even better now that Apple OCR is available.

1 Like

Not that it's important, as you no longer want to do this, but perhaps you could have included the following at the end of the macro:

Disable this macro
Pause for 15min
Enable this macro

That would work. There was a second problem that your suggestion wouldn't fix. That is, the location as displayed in the Find My app sometimes got the location wrong. For example, while my sister was in her house sleeping, the address returned by Find My was "1234 Main St" but every hour so it could switch to "1236 Main St" for a while and then return to "1234 Main St" later on. So to solve this I stored the last ten results in a multi-line variable and if the new location matched any of those results, it wouldn't send me a Message. That way I got notified only if the current location was "truly different from the last 10 locations." But this wasn't perfect either because it didn't always show the final location when she came to a stop.

Once while she was travelling in a car I sent her a photo of her current location, from Google Street view. I thought that might perplex her.

1 Like

The destination is familiar, so we can send the air tags forth and back (otherwise would be really too expensive).

This works quite well witht the "move the cursor to image" action.
You can advise each air tag a symbol in the Find My app. So you cann use these symbols (in my case numbers from 1 to 8) as basic image to send the cursor.

It's time to attach a screenshot from a "Find my" window I guess:

So on the left side you have the row with the AirTags, unfortunately not allways in the proper sequence from 1 to 8 (in this screenshot from 1 to 4), so you could advise the cursor to go to Nr. 1, click (which shows you the position of AirTag Nr. 1 on the right side), make a screenshot and Name it Nr.01 ...
But with the option to move the cursor to an image, you can send the cursor to Nr. 1 and he find it no matter on which position the Nr. 1 is. So you can name it Nr. 1 in the macro going on to save the screenshot under a name.

The advantage of their very small size is their disatvantege on another level: The Air Tags do not produce their own signal as do other Trackers, but just send a signal to the next Iphone arround. The Iphone sends the signal with the identification and the position of the AirTag in an encrypted form to "Find my", so you got it on the map.
So, if there's no Iphone arround like 100 meters, The Find-my app can't update the position and gives you just the last position where it has got a contact with an iphone, as happend to your sisters AT.
For me it's good enough, cause sooner od later someone with an iphone passes by and gives my an updated position, so the storing in a multi-line variable is nice but to sophisticated for my case.

Hope, I could have move the case foreward, questions allways welcome.

I understand, but I did say "Rather than Airtags, I was using iPhone locations in the Find My App". And I also said that her iPhone was producing slightly different location results every hour. Most likely this is caused by either a bad GPS reading or a bad WIFI reading in the location services of her iPhone. This is just a tip for anyone who tries to do the same thing that I did.

Just tried to be once the guy who knows ...
Didnt read your comment exactly enough.

It's alright. Not even The Architect is perfect. Although he's close.