0

我正在寻找一个弹出框,让用户看到它在退出之前有 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"'

我读过您可以使用“延迟”功能,但我在将其内联时遇到了问题。

4

1 回答 1

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"'
于 2014-06-18T10:39:18.010 回答