Floating screenshot

html_prompt
screenshot

#1

Many years ago, I created an Automator workflow that creates a floating screenshot using a web view. I use this almost every day so that I can keep a reference of a chunk of an email, a before/after version of an image, even a snippet of code from Stack Overflow, front-and-center above all other windows. (Especially useful on small screens!)

I got to wondering whether I could improve this using Keyboard Maestro, and not surprisingly, I could.

This macro will create a screenshot using the cmd+shift+4 style selection (window or crosshairs) and then float that screenshot above all your other windows. Thanks to KM8, it is resizable and will automatically scale the image as you resize the floating window.

Screen Capture - Floating Screenshot.kmmacros (4.1 KB)

image


Floating Window - Screen Capture (ImageMagick)
Is it conceivable to create a macro to pin windows (not split screen)?
#2

Nice!


#3

I agree with Peter, Nice!


#4

I found this macro and gave it try, but it seemed to completely hangup. I was unable to kill the window and had to reboot my machine.

Has this been tested with High Sierra by someone else? Just wondering if I had a one-off issue.

Todd


#5

Still working fine here on low Sierra 10.12.6, but I wonder if you are hitting a permissions issue with its use of the /tmp directory ?

(It could be tweaked to use the temporary directory that the AS/JS scripting additions point to)


#6

Does this tweaked version work ?

Screen Capture - Floating Screenshot (minor variant of iNik macro).kmmacros (22.7 KB)

(It uses a different temporary directory)


#7

Tried the original again and didn’t have problem a second time. My machine was < 5% battery and was starting to act a bit flaky anyway, so perhaps in the writes to “disk” to store state before a shutdown something happened.


#8

Good !

( I enjoyed taking a look at how it works – it’s an excellent macro )


#9

I have upgraded both MacOS X and KM and am not having any problems.


#10

Great workflow. I wonder if this can be modified to append several screenshots in a row (vertically scrollable) from a set folder of screenshots. Would avoid multiple windows and afford user to reference previously clipped information. Perhaps this is possible, @iNik

It's a thought. I would certainly find it helpful.


#11

@iNik, thanks for sharing. :+1:
This is an excellent Macro, which overlooked when you first posted it. I just discovered it today.

The screencapture always starts in "Window" mode, and I could not find a way to change then to "Selection" mode.

I had to change the first Action to this in order to get "Selection" mode, when running:
Keyboard Maestro 8.2.4 on macOS 10.12.6

image

SCRIPT:
screencapture -ic


#12

Pressing ⟨spacebar⟩ toggles between the two modes
System version: 10.13.6


#13

Pressing space toggles between the modes, just like normal screen cap.