Automator, screenshot problem

I have a simple Quick action made in Automator. I activate it from the touchbar.

If I run this inside Automator it does what you'd expect; it takes a screenshot and saves it as 1.png on the desktop. However, when I activate it anywhere outside Automator it doesn't take a screenshot of what's on my screen, it takes a screenshot of my desktop background.....

It feels like I've tried everything.

I use the very latest version of Catalina. Please help. Thanks.


MacBook Pro 13″, macOS 10.15

Posted on Aug 18, 2020 3:40 PM

Reply

Similar questions

8 replies

Aug 20, 2020 11:44 AM in response to JohnPaulie

Run this script in the Terminal as a zsh script, and see if the resultant reduced image in /tmp/win1 is what you seek:


#!/bin/zsh

RESAMPLE=.70
# write out the first screens full screen image to a file
/usr/sbin/screencapture -D1 -t jpg /tmp/win1

# get the pixel width of this image
pw=$(/usr/bin/sips -g pixelWidth /tmp/win1 | egrep -ow '(\d+)')
reduced_pw=$(printf '%d' $(( $pw * $RESAMPLE )) )
echo $reduced_pw

# resample height (and width) of the reduced dimension jpeg at 100%
/usr/bin/sips -Z $reduced_pw -s formatOptions 100  /tmp/win1
exit 0


and once saved, make the script executable and run it:


chmod +x ./winscale.zsh
./winscale.zsh
open /tmp/win1


Aug 20, 2020 10:40 AM in response to VikingOSX

First, thank you for trying to help!


When creating an Application in Automator rather than a Quick action, the dialogue window leads me to believe me it requires a file or folder "input". Since I want to begin with taking a screenshot I feel this is not what I want (I might be wrong)?


To minimize the margin of error I stripped my Quick action of everything except the first step; take a screenshot. It still doesn't work.

I have additional steps in my ideal Quick action: convert the image from png to jpg and then crop it 70% in width and height. These steps work flawlessly, but the first step of taking a screenshot doesn't work. Again, it takes a shot of my desktop background and not of what is actually on my screen.

This useless image is converted to jpg and then cropped just like I want.


Thanks in advance.

Aug 20, 2020 10:58 AM in response to VikingOSX

Again: I have additional steps in my ideal Quick action: convert the image from png to jpg and then crop it 70% in width and height. These steps work flawlessly, but the first step of taking a screenshot doesn't work. Again, it takes a shot of my desktop background and not of what is actually on my screen.


Edit: to clarify even more, this would take me from a 6-step to a 1-step. Would save me a ton of time in my work (bookkeeping).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator, screenshot problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.