在脚本中添加错误处理和等待时间。
示例代码:
try tell application "Finder" -- 插入需要执行的任务代码 end tell on error -- 发生错误时,等待1秒钟,然后重试 delay 1 tell application "Finder" -- 重新执行需要执行的任务代码 end tell end try
上一篇:Apple脚本包含JavaScript无法正常工作。
下一篇:Apple脚本以间隔刷新Safari,并以间隔运行关键代码。