screencapture -l 작동하지 않음 : 잘못된 옵션


0

내가 잘못 StackOverflow에 같은 질문을 열었습니다. 여기서 더 나은 설명을 찾기를 바랍니다.

많은 페이지에서 보았습니다 (예 : 화면 캡처 -l에 전달할 창을 찾으려면 어떻게합니까? ) 당신은 명령을 사용해야합니다 : screencapture -l 그 ID를 주어진 단일 창을 캡처합니다.

그러나 screencapture -l 터미널에 입력하려고하면이 오류가 발생합니다.

screencapture: illegal option -- l

참조를 확인했는데 실제로 screencapture의 가능한 속성으로 -l을 볼 수 없습니다. http://guides.macrumors.com/screencapture

어떻게 설명하니? 어떻게 해결할 수 있습니까?


실행할 오류가 아닌 전체 명령을 추가 할 수 있습니까? Safari를 열고 명령 줄을 복사 / 붙여 넣기하면 apple.stackexchange.com/a/56566/9058 ?
nohillside

screencapture -l, screencapture -l idwindow a.png로 시도한 다음 사파리를 열어 코드를 붙여 넣습니다. 매번 같은 오류.
KingBOB

창 ID를 얻기 위해 AppleScript를 사용 했습니까?
Matthieu Riegler

나는 계획하고있어. 이번에는 쿼츠 디버그를 사용하고 "wid"
KingBOB

참조에서 -l 옵션을 찾을 수 없기 때문에 이상합니다. ss64.com/osx/screencapture.html
KingBOB

답변:


1

그만큼 -l 옵션에는 창 ID에 대한 인수가 필요합니다.

$ screencapture -l
screencapture: illegal option -- l
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
$ screencapture -l $(osascript -e 'tell app "Safari" to id of window 1') test.png
$

또는 이전 버전의 OS X가있는 경우, screencapture 은 (는) -l 선택권. 적어도 10.8에서 -l 옵션은 도움말 메시지에만 표시되며 설명서 페이지에는 표시되지 않습니다.

osascript -e 'tell app "Appname" to id of window 1' 모든 응용 프로그램에서 작동하지는 않지만 Windows의 ID를 찾는 다른 방법에 대해서는 다음 질문을 참조하십시오.


10.5.8에있을 경우 사용할 방법이 있습니까?
KingBOB

나는 어떤 전문가에 의한 것이 아니지만 화면 캡처 명령의 업데이트 된 버전을 얻었을 때 나는 / usr / sbin / screencapture 파일을 대체 할 수 있습니까?
KingBOB

나는 /usr/sbin/screencapture 10.8 설치 이리 ,하지만 그것이 작동하는지 확실하지 않습니다.
Lri

아니! 지금 그것은 모든 haha에서 작동하지 않고있다 나에게 "Illegal instruction"
KingBOB

Safari의 windowid를 발견했습니다 : 4656 그래서 다음과 같은 명령을 입력했습니다 : screencapture -l 4656 ~ / Desktop / test.png하지만 아무 일도 일어나지 않았습니까?
hoangpx
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.