Applescript + shell script screencapture

I’m trying to create the ability to take a screenshot of the selection of the screen and send it immediately to Acorn.

This will work when I type it into the terminal:
screencapture -iBcom.flyingmeat.Acorn6 test.png

When I put this in an applescript like this:

set capture2Acorn to "/bin/zsh -c 'screencapture -iB com.flyingmeat.Acorn6 bazinga.png'" do shell script capture2Acorn

it will take the screenshot but nothing gets passed to Acorn…

I am not an experienced applescripter, just copying from Google. I’m hoping that someone can point out all my errors.


Try giving the full path for screencapture, and also a full path to where to store the file:

set capture2Acorn to "/usr/sbin/screencapture -iB com.flyingmeat.Acorn6 ~/Desktop/bazinga.png"
do shell script capture2Acorn

Yes - that worked!
It looks like the path to ‘screencapture’ is not strictly required but the path for the file makes the screenshot show up in Acorn.
Yeah! One step down the path of getting rid of Snagit! (its a fine program but it seems like they are trying to turn it into page-layout software)
Thank you for your help!