Func du()
$userbh = GUICtrlRead($Input1_1,"")
$mdb = IniReadSection($udata, $userbh)
If $userbh = "" Or $userbh = "请输入18位用户编号" Then
MsgBox(64, "提示", "代码项不能为空")
ControlFocus($Form1, "", $Input1_1)
ElseIf $userbh = $mdb Then
duru()
Else
$tc = MsgBox(32 + 1, "提示", $userbh & @CRLF & "号码不存在" & @CRLF & "点确定添加新用户!!" & @CRLF & "点取消重新填写!!")
If $tc = 1 Then
GUISwitch($Form2)
GUISetState(@SW_SHOW)
ControlSetText($Form2, "", $Input2_2, $userbh)
EndIf
EndIf
EndFunc
我改成下边这样也不行`Func du()
$userbh = GUICtrlRead($Input1_1,"")
$mdb = IniReadSection($udata, $userbh)
For $i = 1 To $mdb[0][0]
If $userbh = "" Or $userbh = "请输入18位用户编号" Then
MsgBox(64, "提示", "代码项不能为空")
ControlFocus($Form1, "", $Input1_1)
ElseIf $userbh = $mdb[$i][0] Then
duru()
Else
$tc = MsgBox(32 + 1, "提示", $userbh & @CRLF & "号码不存在" & @CRLF & "点确定添加新用户!!" & @CRLF & "点取消重新填写!!")
If $tc = 1 Then
GUISwitch($Form2)
GUISetState(@SW_SHOW)
ControlSetText($Form2, "", $Input2_2, $userbh)
EndIf
EndIf
Next
EndFunc
|