【已解决】多个以上的判断~IF ELSE如何写呢?
本帖最后由 pizigao 于 2010-9-15 12:32 编辑我这个好像错了~请大家指教
If $rs.Fields($i).value == "1" Then;
GUICtrlSetData ($sbfk,"你好")
ElseIf $rs.Fields($i).value == "2" Then
GUICtrlSetData ($sbfk,"再见")
Else $rs.Fields($i).value == "3" Then
GUICtrlSetData ($sbfk,"成功")
If $rs.Fields($i).value == "4" Then
GUICtrlSetData ($sbfk,"失败")
ElseIf $rs.Fields($i).value == "5" Then
GUICtrlSetData ($sbfk,"好的")
ElseIf $rs.Fields($i).value == "6" Then
GUICtrlSetData ($sbfk,"是的") 两个的我会写~
If $rs.Fields($i).value == "1" Then;
GUICtrlSetData ($sbfk,"你好")
ElseIf $rs.Fields($i).value == "2" Then
GUICtrlSetData ($sbfk,"再见")
EndIf
EndIf Switch $rs.Fields($i).value
Case 1
GUICtrlSetData ($sbfk,"你好")
Case 2
GUICtrlSetData ($sbfk,"再见")
EndSwitch Select...Case...EndSelect
Switch...Case...EndSwitch
都是用来解决你的问题的~ Select...Case...EndSelect
Switch...Case...EndSwitch
都是用来解决你的问题的~
t87564833 发表于 2010-9-15 10:52 http://www.autoitx.com/images/common/back.gif
试试这个~谢谢楼上的两位 我的脚本里已经有Switch...Case...EndSwitch的语句了~中间还可以加么? 我的脚本里已经有Switch...Case...EndSwitch的语句了~中间还可以加么?
pizigao 发表于 2010-9-15 10:58 http://www.autoitx.com/images/common/back.gif
测试可行~
页:
[1]