0

The screencapture command doesn't seem to be able to capture a specific window when it is invoked from the command line, but is able to do it when it is used interactively whit shift+command+4.

How can I capture a window from a script ?

alecail
  • 3,993
  • 4
  • 33
  • 52

2 Answers2

0
screencapture -w yourfile.png

However the window selection itself is still interactive.

plannapus
  • 18,529
  • 4
  • 72
  • 94
0

$ screencapture -l #windowId capture.png

alecail
  • 3,993
  • 4
  • 33
  • 52