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

Auto click after begin screen capture -w?

Hi,


I'm creating a script that automates screenshots for a list of URLs. I'm wanting the user to select the Safari window they want captured (for the list of URLs) once and then the script to select that window for the rest of the list.


Is there a way to automate a click during the "screencapture -w" command?


I've tried many ways but haven't yet been successful.


Thanks in advance!

Posted on Apr 10, 2015 8:41 AM

Reply
Question marked as Best reply

Posted on Apr 10, 2015 11:22 AM

Hi,


You can use the ID of the window after the -l option, like this AppleScript


tell application "Safari"

set thisID to id of front window

end tell

do shell script "screencapture -l " & thisID & " ~/Desktop/safariCapture.png"

3 replies

Auto click after begin screen capture -w?

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