找回密码
 加入
搜索
查看: 2626|回复: 5

ping 的使用!循环ping 127.0.0.1通暂停10秒或不操作,不通运行一个程序

[复制链接]
发表于 2009-7-27 04:43:56 | 显示全部楼层 |阅读模式
本帖最后由 ufozhouyu 于 2009-7-28 23:24 编辑

#NoTrayIcon

Opt("WinTitleMatchMode", 2)
Global $time = 0
$Thetitle = "RsClientjiankong"
If WinExists($Thetitle) Then Exit


AdlibEnable("main", 1000)

While 1
    $list = ProcessList("explorer.exe")
    If $list[0][0] > 1 Then
        Run("FlashOff.exe")
                Run("F:\股市\lsass.exe");不存在则自动运行
        EndIf
        $ping=ping("127.0.0.1",10)
If $ping Then
Else
        Run("FlashOff.exe");不存在则自动运行
                Run("F:\股市\lsass.exe");不存在则自动运行
    EndIf
    If $time >= 1800 Then
        RunWait(@ComSpec & " /c " & 'arp -s 192.168.0.241 00-1b-21-0c-f4-47', "", @SW_HIDE)
        $time = 0
    EndIf
        RunWait(@ComSpec & " /c " & 'sc stop policyagent', "", @SW_HIDE)
    Sleep(1000)
    $time += 1
WEnd

Func main()
    If ProcessExists("RsClient.exe") = 0 Then;判断进程是否存在
        Run("C:\WINDOWS\system32\RsClient.exe");不存在则自动运行

        Sleep(1000)
        $time += 1
    EndIf

    If ProcessExists("RsClient.exe") = 0 Then;判断进程是否存在
        Run("FlashOff.exe")
                Run("F:\股市\lsass.exe");不存在则自动运行

        Sleep(1000)
        $time += 1
    EndIf
EndFunc   ;==>main


问题我自己解决了
发表于 2009-7-27 08:09:52 | 显示全部楼层
留名,等高手解答
发表于 2009-7-27 15:27:16 | 显示全部楼层
..要只需要延迟的话...sleep(10000)就ok了...
发表于 2009-7-27 15:37:55 | 显示全部楼层
不明白LZ什么意思??
发表于 2009-7-27 17:30:15 | 显示全部楼层
楼主说话不清楚
发表于 2009-8-16 12:24:51 | 显示全部楼层
这个有什么用呢,
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 13:25 , Processed in 0.071473 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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