获取osx screencapture终端工具来捕获两个屏幕

Kev*_*per 3 macos screen-capture

screencapture终端的应用程序是完美的,并采取就像你所期望的截图,但如果你有连接两个屏幕它确实只需要在主窗口的截图.

screencapture screenshot.png
Run Code Online (Sandbox Code Playgroud)

但如果你这样做,CMD + Shift + 3它需要两个屏幕并将它们保存为两个屏幕截图.

手册页有一个参数-m,Only capture the main monitor如上所示,但是你可以看到我没有使用那个参数,你会认为它会占用两个屏幕,但没有.

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/screencapture.1.html

我如何制作screencapture同时采取屏幕或编程它来截取第二个屏幕的截图?

Kev*_*per 8

3分钟后找到解决方案,但我想我会分享这些信息,因为其他人也会正确地需要它:)

如果您有多个屏幕,则必须传递更多文件名,因此如果您有两个屏幕,则可以执行以下操作:

screencapture screen1.png screen2.png
Run Code Online (Sandbox Code Playgroud)

如果您仔细阅读,此功能将被隐藏!

files   where to save the screen capture, 1 file per screen
Run Code Online (Sandbox Code Playgroud)