找回密码
 加入
搜索
查看: 1286|回复: 4

求人改代码

[复制链接]
发表于 2008-12-28 15:33:08 | 显示全部楼层 |阅读模式
#NoTrayIcon
$ping = Ping("192.168.0.10",250)
if $ping >= 1 Then
        RunWait ("\\server\qz$\sa\Desk.exe")
        Else
Msgbox(0,"状态","发生错误,错误码为: " & @error)
EndIf
Sleep(5000)
$as = WinExists ( "Thief Soft(抓*软件)" )
if $as = 1 Then
        ProcessClose ( "Desk.exe" )
RunWait ("\\server\qz$\sa\Desk.exe")
EndIf

这样有错吗
为什么运行之后只执行
#NoTrayIcon
$ping = Ping("192.168.0.10",250)
if $ping >= 1 Then
        RunWait ("\\server\qz$\sa\Desk.exe")
        Else
Msgbox(0,"状态","发生错误,错误码为: " & @error)

后面那些为什么不起作用?


还有帮我改成如果ping 192.168.0.10
不通的时候5秒ping 一次
10次之后退出并提示错误
发表于 2008-12-28 15:55:54 | 显示全部楼层
$ping = Ping("192.168.0.10")
If $ping = 0 Then
        For $i = 1 To 10
                $ping = Ping("192.168.0.10")
                If $ping > 0 Then ExitLoop
        Next
        If $i = 10 Then
                MsgBox(0, "状态", "发生错误,错误码为: " & @error)
        EndIf
EndIf


没测试...
发表于 2008-12-28 16:57:34 | 显示全部楼层
RunWait()要等程序运行完才会继续执行下面的代码
 楼主| 发表于 2008-12-29 20:19:50 | 显示全部楼层
原帖由 liongodmien 于 2008-12-28 16:57 发表
RunWait()要等程序运行完才会继续执行下面的代码



那有什么方法能调用并运行\\server\qz$\sa\Desk.exe不出提示
我试了run
有提示
发表于 2008-12-29 21:23:50 | 显示全部楼层
除了RUN,还有RUNAS等...
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 09:23 , Processed in 0.080099 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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