user3321551
user3321551

Reputation: 133

How do I make an apple script to save screenshots to clipboard?

Right now, on Macs, when you click shift-command-4, you can select an area on the screen to take a screenshot of. The photo is then saved on your desktop.

How can I make an apple script so that it also saves the photo on my clipboard?

Upvotes: 0

Views: 1900

Answers (1)

ShooTerKo
ShooTerKo

Reputation: 2282

Maybe the terminal tool screencapture is your friend. You can write a script like

do shell script "screencapture -ci"

and start that. The parameters used in this script are doing the following:

  • -c Force screen capture to go to the clipboard
  • -i Capture screen interactively, by selection or window. The control key will cause the screen shot to go to the clipboard. The space key will toggle between mouse selection and window selection modes. The escape key will cancel the interactive screen shot.

You can find all parameters for the screen capture tool using man screencapture in Terminal.app, i.e. the parameter P would open the screen shot directly in Preview.app.

Have fun, Michael / Hamburg

Upvotes: 1

Related Questions