지정된 영역의 스크린 샷을 찍기 위해 자동화기를 사용하려고합니다. 창 또는 전체 화면의 스크린 샷을 찍는 옵션 만 찾을 수 있지만. 자동화 또는 애플 스크립트를 사용 하여이 옵션을 사용할 수 있습니까?
답변
screencapture
-R
영역을 지정 하는 옵션이 있습니다. 매뉴얼 페이지에는 언급되어 있지 않지만 도움말 메시지에는 언급되어 있습니다.
$ screencapture -h
screencapture: illegal option -- h
usage: screencapture [-icMPmwsWxSCUtoa] [files]
-c force screen capture to go to the clipboard
-C capture the cursor as well as the screen. only in non-interactive modes
-d display errors to the user graphically
-i capture screen interactively, by selection or window
control key - causes screen shot to go to clipboard
space key - toggle between mouse selection and
window selection modes
escape key - cancels interactive screen shot
-m only capture the main monitor, undefined if -i is set
-M screen capture output will go to a new Mail message
-o in window capture mode, do not capture the shadow of the window
-P screen capture output will open in Preview
-s only allow mouse selection mode
-S in window capture mode, capture the screen not the window
-t<format> image format to create, default is png (other options include pdf, jpg, tiff and other formats)
-T<seconds> Take the picture after a delay of <seconds>, default is 5
-w only allow window selection mode
-W start interaction in window selection mode
-x do not play sounds
-a do not include windows attached to selected windows
-r do not add dpi meta data to image
-l<windowid> capture this windowsid
-R<x,y,w,h> capture screen rect
files where to save the screen capture, 1 file per screen