Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Any Applescript to Take Screenshot and save to Clipboard?

Does anyone have an applescript to Take Screenshot and save to Clipboard?


Thanks.

MacBook Pro (13-inch Mid 2010), Mac OS X (10.7.3)

Posted on Apr 6, 2013 11:24 AM

Reply
Question marked as Best reply

Posted on Apr 6, 2013 1:20 PM

You can use the screencapture utility, for example:


do shell script"screencapture -c"


... and there is also the Take ScreenShot Automator action 😉.

7 replies

Apr 6, 2013 4:39 PM in response to pjdube

Yes, just paste my posted statement into a Run AppleScript action - the action does need the run handler, so if you were pasting in only the statement that would be why it isn't working. The action contents would be something like:


onrun {input, parameters}


do shell script"screencapture -c"


returninput-- pass on original input

endrun


You can also use just the command part (the string enclosed in quotes) in a Run Shell Script action.

Aug 21, 2016 9:08 AM in response to pjdube

Hello.

In the script below, the very last line, can someone tell me what I'm doing wrong that the date is not appended to the line. I swear it must be a very basic problem. El Capitan. Thank you.



set nid to (get name of first window whose visible is true)

set wid to (get id of first window whose visible is true)

do shell script "screencapture -T1 -l" & wid & " ~/Desktop/PrefsPics/" & nid & "$(date +%Y-%m-%d-%H%M%S).png"

Any Applescript to Take Screenshot and save to Clipboard?

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