这样在写脚本时,一些简单的输入就可以使用图型化的方式完成了。
样例:
脚本:
#!/bin/bash
ROTATEDIRECTION=`./smartgui showradiobutton "旋转屏幕" " 请选择屏幕旋转方向 " "正常" "向左" "向右" "翻转"`
MESSAGE="您选择的旋转方向为:$ROTATEDIRECTION"
./smartgui showmessagebox "旋转屏幕" $MESSAGE info ok
ROTATEDIRECTION=`./smartgui showradiobutton "旋转屏幕" " 请选择屏幕旋转方向 " "正常" "向左" "向右" "翻转"`
MESSAGE="您选择的旋转方向为:$ROTATEDIRECTION"
./smartgui showmessagebox "旋转屏幕" $MESSAGE info ok
组件使用说明:
方法及参数:showmessagebox title message messagetype buttonstype
showentry title message value
showcombobox title message values ...
showcheckbox title message values ...
showradiobutton title message values ...
showspinbutton title message min, max, step, value
messagetype 可选值
info
warning
question
error
other
buttonstype 可选值
none
ok
close
cancel
yes-no
ok-cancel
values ... 为可变参数, 参数即为选项值。
组件下载:
/Files/zhongzf/smartgui-x86-v1_0.zip
/Files/zhongzf/smartgui-arm-v1_0.zip
/Files/zhongzf/智友占卜.zip