【发布时间】:2014-05-07 05:12:24
【问题描述】:
获取结果:
"<NSAppleEventDescriptor: [ 1 ]>"
我在 Automator 的 Applescript Shell 中有一个对话框
display dialog "¿ What database did you use for your sequences ?" buttons {"RefSeq", "Ensembl"} default button 2
set the button_pressed to the button returned of the result
if the button_pressed is "RefSeq" then
return 0
else if the button_pressed is "Ensembl" then
return 1
end if
为什么不只是打印字符串?我使用“设置为变量”将它设置为一个变量,然后我使用“获取变量”在我的 Python Shell 脚本之前获取该变量
在我简单使用的 Python Shell 脚本中:
var_1 = sys.argv[1]
【问题讨论】:
-
您是否意识到您是在说您想要返回一个字符串但您正在返回一个数字?尝试在 "1" 和 "0" 周围加上引号,使它们成为字符串。
标签: string applescript automator dialog