我希望设置一个弹出框,让用户看到它在退出之前有10秒的延迟并且脚本继续。到目前为止,我已经得到了以下内容。
osascript -e 'tell app "System Events" to display dialog with delay "10" "Running Health Check \r \rPlease allow 30 seconds or more to complete." with title "Health Check"'
我读过您可以使用"延迟"功能,但我在内联时遇到问题。
答案 0 :(得分:0)
我找到了答案,我需要做的是添加以下内容......
giving up after 10
所以我的整体脚本现在看起来像这样......
osascript -e 'tell app "System Events" to display dialog with delay "10" "Running Health Check \r \rPlease allow 30 seconds or more to complete." giving up after 10 with title "Health Check"'