【发布时间】:2013-04-22 17:46:51
【问题描述】:
有没有办法在终端完成命令时得到通知?
-> 我运行另一个脚本(不是我的!),该脚本完成后下载数据我想退出终端并用这些数据做其他事情。
编辑:
我可能没问对...
例子:
tell application "Terminal"
keystroke "php downloadscript.php"
keystroke return
end tell
if (downloadFinished)
-- do stuff
else
-- wait till finished
编辑 2: 惊人的!谢谢! 像这样工作:
tell application "Terminal"
set frontWindow to window 1
repeat until busy of frontWindow is false
delay 1
end repeat
#display dialog "finished"
end tell
你好
哈士奇
【问题讨论】:
标签: macos notifications terminal applescript