Trigger on mouse release?

Just checking, is there a trigger on mouse button release action that can be used to end a pause in a workflow?

I've worked around it by chaining a pair of pause actions, but I imagine there's a more efficient / less hacky option.

Thanks.

Instead of using the screenshot hotkey, put this in an Execute shell script action:

screencapture -i -c

You don't need any pauses as the macro won't move on until you've finished taking the screenshot.

Oh that's really cool, thanks.

I don't suppose you could update it for the version where it saves the screenshot to the desktop as it does for command, shift 4?

removing the -c flag causes it to fail... and the file variable isn't documented for its syntax in the man page... screencapture -i ~/Desktop doesn't work.

To specify, the default behaviour of command shift 4 is to save the image to the desktop with the file naming convention of "Screen Shot YYYY-MM-DD HH.MM.SS (am/pm - weird even though it's a 24 hour time).png".

You need a full file path, including the name. You might find it easier to do this in KM itself, using the command @noisneil gave to capture to the clipboard, then a KM "Write to File" action to write the system clipboard to wherever you want:

Screen Shot.kmmacros (2.1 KB)

Image

I've included the " at ", which is usually there when doing ⌘⇧4, but missed off the am/pm since we're using a 24-hour timestamp.

(The naming convention for an OS screen shot is taken from your system's date/time/etc settings, but here you can format it however, and include whatever text, you like.)

You can do it in the shell script action by feeding a timestamp into the path -- but this is way easier!

1 Like