拍摄人物照片的AppleScript

时间:2018-10-10 17:30:21

标签: applescript

我试图通过拍摄photoBooth的屏幕快照来制作可拍摄照片的AppleScript。但是,我无法将窗口设置为一个。这是我的代码:

tell application "Photo Booth"
activate

set volume output volume 0


tell application "Finder" to set visible of process "Photo Booth" to false

set windowid to id of window 1 of application "Photo Booth"

do shell script "screencapture -l" & windowid & " ~/test.png"

tell application "Photo Booth"

end tell

delay 0
quit

结束告诉

0 个答案:

没有答案