yad - 使用变量

时间:2015-08-12 13:45:30

标签: linux shell user-interface variables

我想创建一个GUI窗口,然后从该界面中选择文件路径并设置参数,然后运行整个shell脚本。

我的解决方案是:

files=$(zenity --file-selection --multiple --separator='' --title "Choose my files")

导出文件

parameters=$(yad --width 500 --height 500 --title "Whole parameters" --form --field="Threshold1" --field="Threshold2" --field="Threshold3")

然后我可以在我的其他shell命令中使用这些参数..

可以创建一个GUI窗口,然后选择文件路径,参数等等......并在我的shell脚本中使用这些变量?

类似的东西:

parameters=$(yad --width 500 --height 500 --title "Whole parameters" --file-selection --form --field="Threshold1" --field="Threshold2" --field="Threshold3")

感谢您提供任何帮助和建议..

彼得。

1 个答案:

答案 0 :(得分:0)

最后我找到答案..它看起来像这样:

files=$(yad --width 800 --height 600 --title "GUI PROGRAM" \
    --form \
    --field="Laboratory:":RO "Laboratory" \
    --field="Memory:":NUM "VALUE[!2..64[!2]]" \
    --field="Click to select files":MFL "" \
    --field="Please Select Your Working Directory":DIR "C" \