找回密码
 加入
搜索
查看: 1550|回复: 6

请问这两个语句有啥区别

[复制链接]
发表于 2009-11-9 01:41:00 | 显示全部楼层 |阅读模式
本帖最后由 lzymbz 于 2009-11-9 16:01 编辑

If ProcessExists("iexplore.exe") Then
   ProcessClose("iexplore.exe")
EndIf

第一条

While 1
    If ProcessExists("iexplore.exe") Then
        ProcessClose("iexplore.exe")
        ExitLoop
    EndIf
WEnd

第二条

这是个关闭ie进程的功能

我看好多例程中都用第一条

但是我自己做的好像第一条不起作用

第二种才起作用

麻烦前辈给讲讲

附一个我自己做的脚步,不知道是我套用的不对还是别的原因

#requireadmin
#Region AutoIt3Wrapper 预编译参数(常用参数)
#AutoIt3Wrapper_icon=ico.ico
#AutoIt3Wrapper_outfile=自动安装.exe
#AutoIt3Wrapper_Res_Description=迅雷5.9.10.1144安装脚本
#AutoIt3Wrapper_Res_LegalCopyright = 版权所有 (C) 2009
#AutoIt3Wrapper_Res_Comment=www.51aou.com 制作:醉爱清茶
#EndRegion AutoIt3Wrapper 预编译参数设置完成
#comments-start __________________
Au3 版本:  3.3.1.4
脚本作者:  醉爱清茶
QQ/TM:  410836733
脚本功能: 自动安装迅雷5.9.10.1144
#comments-end 脚本开始___________

BlockInput(1)
Run ('Thunder.exe')
traytip(" 温馨提示","自动安装期间为避免操作失败,将锁定键盘鼠标",15)
WinWaitActive("迅雷5 : 用户使用协议","欢迎使用 迅雷5 安装向导")
Send("!y")
WinWaitActive("迅雷5: 安装选项","您想要安装程序执行哪些附加任务")
Send("{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{DOWN}{SPACE}")
ControlSetText("迅雷5: 安装选项","","Edit1","c:\Program Files\Thunder Network\Thunder")
Send("!n")
WinWaitActive("安装:迅雷5","百度工具栏  轻松搜索,拦截广告")
ControlClick("安装:迅雷5","","Button4")
ControlClick("安装:迅雷5","","Button2")
While 1
    If ProcessExists("iexplore.exe") Then
        ProcessClose("iexplore.exe")
        ExitLoop
    EndIf
WEnd
WinWaitActive("迅雷5: 安装完成","迅雷5安装程序已完成安装")
ControlClick("迅雷5: 安装完成","","Button5")
ControlClick("迅雷5: 安装完成","","Button6")
ControlClick("迅雷5: 安装完成","","Button7")
Send("!f")
FileDelete(@DesktopCommonDir&"\迅雷游戏.lnk")
发表于 2009-11-9 08:01:52 | 显示全部楼层
While 1
    If ProcessExists("iexplore.exe") Then
        ProcessClose("iexplore.exe")
        ExitLoop
    EndIf
WEnd
改为
ProcessWait("iexplore.exe")
ProcessClose("iexplore.exe")
如果默认不是ie浏览器,则脚本可能停在此处
发表于 2009-11-9 10:21:31 | 显示全部楼层
一个是等待进程出现,一个是没等待,差别就在这
 楼主| 发表于 2009-11-9 16:01:20 | 显示全部楼层
谢谢两位前辈

知道了差别

谢谢了
发表于 2009-11-9 21:38:44 | 显示全部楼层
Au3 版本:  3.3.1.4 这个我放弃了!!!

太多BUG!!!!!!!!
发表于 2009-11-9 22:10:58 | 显示全部楼层
Au3 版本:  3.3.1.4 这个我放弃了!!!

太多BUG!!!!!!!!
131738 发表于 2009-11-9 21:38


谢谢提醒,还好没更新
发表于 2009-11-10 23:04:58 | 显示全部楼层
5楼成功跑题 囧
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-18 15:19 , Processed in 0.074453 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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