不是每次都发生,而是每十分之一,我的AppleScript应用会因超时错误(-1712)而崩溃。我尝试放入超时子句,但仍然收到错误。本来是要执行以下脚本,然后转到空闲处理程序,但似乎偶尔会崩溃在下面的代码上,并弹出错误1712对话框,然后不再进入空闲处理程序。
我如何阻止它出现此错误,或者无论如何确实使它继续对空闲处理程序起作用?
try
with timeout of 600 seconds
activate application "iTunes"
tell application "iTunes"
set sound volume to 100
set myPlists to name of playlists
repeat with playlistX in myPlists
download playlist playlistX
end repeat
set current AirPlay devices to AirPlay device airDevice
end tell
set volume output volume soundVolume
end timeout
end try