【发布时间】:2021-02-19 02:16:41
【问题描述】:
我在 QuickTime Player 中运行 AppleScript 来执行音频录制。当用户单击按钮停止录音时,我如何等待片刻?我们需要将“延迟5”替换为等待。
set filePath to (path to desktop as text) & "test.m4a"
delay 1
tell application "QuickTime Player"
activate
set new_recording to (new audio recording)
tell new_recording
start
delay 5
stop
end tell
open for access file filePath
close access file filePath
export (first document) in filePath using settings preset "Audio Only"
close (first document) without saving
ignoring application responses
quit
end ignoring
end tell
【问题讨论】:
标签: applescript quicktime