While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Xinzhengdongzhan
$some = _IECreate("http://217.00.00.14:8081", 0, 0)
$sText = _IEBodyReadText($some)
If StringInStr($sText, "无法显示网页") Then
_IENavigate($oIE, "http://192.168.1.150:8081/")
Else
_IENavigate($oIE, "http://217.00.00.14:8081/")
EndIf
Case $msg = $GUI_Button_Naiguan
$some = _IECreate("http://217.00.00.14:8081", 0, 0)
$sText = _IEBodyReadText($some)
If StringInStr($sText, "无法显示网页") Then
_IENavigate($oIE, "http://192.168.1.151:8082/")
Else
_IENavigate($oIE, "http://217.00.00.14:8082/")
EndIf
Case $msg = $GUI_Button_Mazhai
$some = _IECreate("http://217.00.00.14:8081", 0, 0)
$sText = _IEBodyReadText($some)
If StringInStr($sText, "无法显示网页") Then
_IENavigate($oIE, "http://192.168.1.152:8083/")
Else
_IENavigate($oIE, "http://217.00.00.14:8083/")
EndIf
Case $msg = $GUI_Button_Bangong
$some = _IECreate("http://217.00.00.14:8081", 0, 0)
$sText = _IEBodyReadText($some)
If StringInStr($sText, "无法显示网页") Then
_IENavigate($oIE, "http://192.168.1.153:8084/")
Else
_IENavigate($oIE, "http://217.00.00.14:8084/")
EndIf
Case $msg = $GUI_Button_Zhuangchezhan
$some = _IECreate("http://217.00.00.14:8081", 0, 0)
$sText = _IEBodyReadText($some)
If StringInStr($sText, "无法显示网页") Then
_IENavigate($oIE, "http://192.168.1.154:8085/")
Else
_IENavigate($oIE, "http://217.00.00.14:8085/")
EndIf
EndSelect
WEnd
自己是这样写的,内网测试通过,明天测试下外网看行不
大侠帮帮忙看看,是不是有更简单的方法 |