找回密码
 加入
搜索
楼主: huangniuyingchu

有的软件在制作自动安装包时,联网有网页弹出,断网没有,怎么写代码啊

 火.. [复制链接]
发表于 2010-6-24 19:52:14 | 显示全部楼层
If Ping("www.baidu.com",250) = 0 Then
exit
Else
run(StringTrimLeft(StringLeft(RegRead("HKCR\HTTP\shell\open\command", ""), StringInStr(RegRead("HKCR\HTTP\shell\open\command", ""), ".exe") + 3), StringInStr(RegRead("HKCR\HTTP\shell\open\command", ""), ":") - 2) & " www.baofeng.com")
EndIf
发表于 2010-6-25 10:45:00 | 显示全部楼层
Global Const $NETWORK_ALIVE_LAN = 0x1
Global Const $NETWORK_ALIVE_WAN = 0x2

Func _NetWorkOnline()
        $NetWorkSituation=DLLCall("sensapi.dll","int","IsNetworkAlive","str",$NETWORK_ALIVE_LAN)
        If $NetWorkSituation[0]=1 Then
                $LResult=True
        Else
                $LResult=False
        EndIf
        Return $LResult
EndFunc
检测本地连接的代码。
发表于 2010-7-16 11:08:23 | 显示全部楼层
学习学习。。。
发表于 2010-7-16 11:40:44 | 显示全部楼层
期待高手的例子,重点是如何检测一台电脑是否联网!最好写成一个函数,用返回值来进行判断就够了!
发表于 2010-7-16 14:26:53 | 显示全部楼层
期待高手的例子,重点是如何检测一台电脑是否联网!最好写成一个函数,用返回值来进行判断就够了!
yiruirui 发表于 2010-7-16 11:40



    你就不会自己搜索论坛?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-28 07:38 , Processed in 0.125539 second(s), 13 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表