【发布时间】:2021-06-06 02:38:25
【问题描述】:
我打算运行一个 shell 脚本,然后运行一个 AppleScript。但是我想知道是否可以将参数值传递给shell脚本,如下所示。
我遇到了一些我不明白的奇怪错误。有人可以帮我理解错误并提供一种将值(继续/不继续)从 Apple Script 传递给 Shell 脚本的方法吗?
文本格式的代码:
on run {input, parameters}
set theDialogText to "By running this script, it will update your hosts file. Would you like to continue?"
set isupdate to display dialog theDialogText buttons {"Don't Continue", "Continue"} default button "Continue" cancel button "Don't Continue"
return {isupdate}
结束运行
【问题讨论】:
标签: macos shell applescript automator