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)
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 >
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 >
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)
You can use the screencapture utility, for example:
do shell script"screencapture -c"
... and there is also the Take ScreenShot Automator action 😉.
You can use the screencapture utility, for example:
do shell script"screencapture -c"
... and there is also the Take ScreenShot Automator action 😉.
Am I missing something here, there are keystroke commands for taking a screeshot to the clipboard: Control-Shift Command-3 or Control-Shift-Command-4. Why not just incorporate the keystrokes into the script?
Thanks red-menace.
For some reason the Take ScreenShot Automator action is not working 😠, and so I was trying to work around that.
So then I have to use Run Applescript right? Would I just paste
do shell script "screencapture -c" in it?
I tried that and still can't seem to get it to work.
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.
Thanks. Yes, that's what I thought ... but for some reason it is not working. 😠 Weird.
I think there is something wrong with my Automator or something, because even the Take Screenshot action doesn't work.
Maybe I need to restart automator or something. I'll get back to you.
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"
Please ignore the above; I reposted as a new thread.
Any Applescript to Take Screenshot and save to Clipboard?