1

I often need to do screenshots of regions of the screen and paste them into mails, Jira, Confluence etc. On another OS, I use a screenshot tool which lets me select the region, add a nice border with one click, and put it into the clipboard with a second click.

I know how to take a screenshot, but I didn't find an onboard utility which puts a sleek border around it with a single (or very few) clicks, routinely.

(As an added bonus: + + + 4 does not show a loupe while selecting the rectangle; if there is a tool or workflow which would include this in addition to the border, that would be great...).

What would be an easy way to achieve this?

I am technically inclined and not averse to scripting something with some tool... any solution based on that would be fine as well.

3
  • 1
    Has shift-ctrl-command-4 ever been a "zooming" screenshot shortcut? It just saves the shift-command-4 to the pasteboard. If you've enabled zoom (Accessibility) with e.g ctrl you can still use ctrl-scroll to zoom in/out and take the screenshot then. – klanomath Jan 31 '20 at 12:02
  • With "loupe" I mean the feature where the area around the cursor is zoomed out a lot (but only in a small area, not the whole screen), so you can mark a region with pixel-wise accuracy. It's popular with many tools, for example "pipettes" to pick a color from individual pixels and such. – AnoE Jan 31 '20 at 14:23
  • write a script. /usr/sbin/screencapture. manipulate with imagemagick.org/script/mogrify.php. use -border geometry surround image with a border of color – historystamp Feb 1 '20 at 1:23
1

You should look at the App Store first: there are a number of screenshot apps available, some of which may have the features exactly as you want. Type 'screenshot' in the search field, and start poking around.

If you want something free and native, then it's easy enough to script this. You won't be able to get a loupe that way; Apple doesn't provide that option (though you can get exact pixel dimensions from the drag cursor).

Step 1: Copy this script into the script editor and save it as "Screenshot Padding.scpt" (or whatever, as long as it has the 'scpt' extension). It must be saved in '~/Library/Scripts/Folder Action Scripts/'.

on adding folder items to this_folder after receiving these_files
    repeat with this_file in these_files
        tell application "Image Events"
            set this_image to open this_file
            tell this_image
                set image_dims to dimensions
                -- increase dimensions by ten pixels
                repeat with a_dim in image_dims
                    set contents of a_dim to a_dim + 10
                end repeat
                -- set border with revised dimensions and black background
                pad to dimensions image_dims
                close saving yes
            end tell
        end tell
    end repeat
end adding folder items to

Step 2: Create a folder somewhere convenient called (say) Screenshot Folder

Step 3: Open Folder Actions Setup: that's a core service hidden way down deep in the file system, but you can find it through Spotlight. Enable Folder Action if they are disabled, and use the '+' on the lower left to add Screenshot Folder to the folders list. The app will prompt you to choose a script, and you should select the script you saved above. The end result should look something like this: Folder Actions Setup SS Step 4: If you are on OS 10.4 or later, open the Screenshot app (/Applications/Utilities/Screenshot.app), click the 'Options' menu on the utility window that appears, and set the save location to Screenshot Folder. Now whenever you take a screenshot, it will deposit it in that folder and automatically give it a border.

If you are on an earlier system, then you will have to do something more. There are three choices:

  1. Manually or programmatically drag screenshots onto the Screenshot Folder so they are processed
  2. Attach the folder action to the desktop folder, and add code so that it only processes items with titles that contain the word 'screenshot'
  3. Script the unix 'screenshot' utility, which has the option to save screenshots in locations of your choice.

I'll provide details on those if you need them, otherwise I'll assume your OS is up to date.

1
  • Very nice, thank you! Appreciate your effort. Will try this and report back. – AnoE Feb 3 '20 at 8:57
0

To take a screenshot of the whole screen, with a white border and shadow, after you enter the command-Shift-4 press the space bar, wait for your cursor to turn into a camera, then press your mouse button.

2
  • why the downvote?? – Natsfan Feb 1 '20 at 16:08
  • Downvote is not from me, but being able to select a region only is important in the context of this question. I am aware of the fullscreen-with-border screenshot, but that's not what I'm looking for., – AnoE Feb 3 '20 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .