Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
该screencapture命令在从命令行调用时似乎无法捕获特定窗口,但是当它与 shift+command+4 交互使用时能够做到这一点。
screencapture
如何从脚本中捕获窗口?
$ screencapture -l #windowId 捕获.png
screencapture -w yourfile.png
然而,窗口选择本身仍然是交互式的。