我试图通过拍摄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
结束告诉