回复 1# 天空中的鸟人
昨晚在"网管联盟"逛, 半天没见有人给你回复, 所以给你作了一点回复, 想让你得到一点启发.
但没想, 你还没解决问题啊, 应该是你对判断语句的掌握还是太生疏了!
这里给你完整的判断吧, 省得你又继续问的问, 但希望你自己要好好消化才是, 这毕竟是最基础的东西来的.
$ip = StringSplit(GUICtrlRead($Input1), '.')
If $ip[0] <> 4 Then
MsgBox(0, "提示", "请输入一个标准的IP地址! ")
Else
Switch $ip[4]
Case 1 To 128
If $ip[1] = 59 And $ip[2] = 34 And $ip[3] = 197 Then
MsgBox(0, "提示 1", "vlan1")
ElseIf $ip[1] = 121 And $ip[2] = 10 And $ip[3] = 119 Then
MsgBox(0, "提示 3", "vlan3")
ElseIf $ip[1] = 192 And $ip[2] = 168 And $ip[3] = 100 Then
MsgBox(0, "提示 5", "vlan5")
Else
MsgBox(0, "提示 3", "查找不到Vlan")
EndIf
Case 130 To 255
If $ip[1] = 59 And $ip[2] = 34 And $ip[3] = 197 Then
MsgBox(0, "提示 1", "vlan2")
ElseIf $ip[1] = 121 And $ip[2] = 10 And $ip[3] = 119 Then
MsgBox(0, "提示 4", "vlan4")
ElseIf $ip[1] = 192 And $ip[2] = 168 And $ip[3] = 100 Then
MsgBox(0, "提示", "vlan")
Else
MsgBox(0, "提示 3", "查找不到Vlan")
EndIf
EndSwitch
EndIf
|