【发布时间】:2015-06-26 13:27:04
【问题描述】:
我正在使用 Apple Automator,在我的工作流程中,我有一个“运行 AppleScript”。我想向用户展示一个项目列表:
on run
choose from list {"DRNyheder", "DR1", "DRVejret", "ditbt", "ekstrabladet"} with prompt "Please make your selection" without multiple selections allowed and empty selection allowed
set aName to item 1 of the result
display dialog aName
return aName
end run
管道中的下一项是“运行 Shell 脚本”。在这种情况下,它是一个 python 脚本。我的想法是我想将 AppleScript 的输出提供为 argv 1。我已经验证 AppleScript 正在返回一个字符串,就像我期望的那样。
/Users/fred/my_script.py $@
问题是,我没有看到参数被传递给我的 Python 脚本。有人可以帮忙吗?
如果有帮助,这里是这部分工作流程的屏幕截图:
【问题讨论】:
标签: python bash sh osx-yosemite automator