MACRO: ScreenCapture - Select Region & Save to File with Date/Time Stamp [Example] (v9.0.4)

MACRO:   ScreenCapture: Select Region & Save to File with Date/Time Stamp [Example]

~~~ VER: 1.0    2020-01-03 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

ScreenCapture- Select Region & Save to File with Date-Time Stamp [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

Example Output





  • ScreenCapture: Select Region & Save to File with Date/Time Stamp
    • Prompt User for Output Details
    • User Draws Rectangle to Capture Region


  1. First, make sure you have followed instructions in the Macro Setup below.
  2. Open the App and Document where you want to do a screen shot
  3. Trigger this macro.
    • Enter Output Data: File Name, File Format, Output Folder
    • NOTE: The Output Folder MUST already exist
    • Draw a rectangle to select capture area
    • Output file is revealed in Finder
  4. For Details on the Bash screencapture command, see:
    TIP: How to Automate Screen Capture Using Bash screencapture Command


  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me. ??

Make These Changes to this Macro

  1. Assign a Trigger to this macro.
  2. Move this macro to a Macro Group that is only Active when you need this Macro.
  3. ENABLE this Macro, and the Macro Group it is in.
    (all shown in the magenta color)
    • DateTimeForFile format
    • Default values for Prompt for Output Data


  1. KM 8.2+
  2. macOS 10.11.6 (El Capitan)+

TAGS: @ScreenShot @ShellScript


  • Any Action in magenta color is designed to be changed by end-user


  • To facilitate the reading, customizing, and maintenance of this macro,
    key Actions are colored as follows:
  • GREEN -- Key Comments designed to highlight main sections of macro
  • MAGENTA -- Actions designed to be customized by user
  • YELLOW -- Primary Actions (usually the main purpose of the macro)
  • ORANGE -- Actions that permanently destroy Variables or Clipboards,
    OR IF/THEN and PAUSE Actions


  • While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
  • If you have any doubts or questions:

It works perfectly. Sorry it took you so much time !! thank you very much.

1 Like

Many thanks for this script. I cannot tell you how much time this macro has saved but I use it all the time. Works perfectly.

Tweak Ask: is there any way to have a dropdown history of output locations available to easily set it while calling the macro with a shortcut?

For example: right now: I am going into the script and setting the Local_Output folder before I start my screenshots. Each time I want to change locations I change the Default location within the script.

What I am asking for, is to be able to set the default location after calling the macro via a dropbdown list instead and have it remember/save the location until I need to change it next time.

I hope I am explaining myself well enough.
Feel free to ask any clarification questions.

Thank you again for such a wonderful script.

Hello @TomD

Welcome to the Forum :wave:

Unfortunately @JMichaelTX will not reply to you in any of his threads on this Forum - I am very sorry to say that... he is missing here

Go to The Passing of JMichealTX to get more information on that.

Here is another Example Macro from Jim which should give you an idea on how to accomplish your task.

Dynamic Default List for Prompt For User Input [Example]

Greetings from Germany


1 Like