我想要创建一个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")谢谢你的帮助和建议。
彼得。
发布于 2016-01-08 08:45:20
最后我找到了答案..。它看起来可能是这样的:
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" \https://stackoverflow.com/questions/31967079
复制相似问题