passkalilo 发表于 2009-4-27 22:02:49

[已解决]如何判断$oIE所对应的进程是否关闭?

本帖最后由 passkalilo 于 2009-5-16 22:18 编辑

如下代码:
#include <IE.au3>
$url = "www.baidu.com"
$oIE = _IECreate($url)
Sleep(5000)
_IENavigate($oIE,"www.126.com")
如果在Sleep期间,IE进程终止,那么_IENavigate函数会出错,如何在执行之前检查一下$oIE对应的IE进程是否存在?试过这样ProcessExits($oIE)是不行的。

passkalilo 发表于 2009-4-28 11:06:00

没人回答,先顶一个

liongodmien 发表于 2009-5-14 09:25:58

#include <IE.au3>
$url = "www.baidu.com"
$oIE = _IECreate($url)
$hwnd = Hwnd($oIE.hwnd())
Sleep(5000)
if not winexists($hwnd) then exit
_IENavigate($oIE,"www.126.com")

passkalilo 发表于 2009-5-15 19:36:59

3# liongodmien


十分感谢,这么简单怎么就没想到呢

javarike 发表于 2009-6-6 17:00:35

简单的东西往往大家想不到...

javarike 发表于 2009-6-6 17:05:05

#include
$url = "www.baidu.com"
$oIE = _IECreate($url)
$hwnd = Hwnd($oIE.hwnd())
Sleep(5000)
if not winexists($hwnd) then exit
_IENavigate($oIE,"www.126.com")
liongodmien 发表于 2009-5-14 09:25 http://www.autoitx.com/images/common/back.gif




#include <IE.au3>
$url = "www.baidu.com"
$oIE = _IECreate($url)
$hwnd = Hwnd($oIE);$oIE.hwnd())不行.
Sleep(5000)
if not winexists($hwnd) then exit
_IENavigate($oIE,"www.126.com")

paulzhu 发表于 2009-8-26 22:59:47

#include <IE.au3>
$url = "www.baidu.com"
$oIE = _IECreate($url)
$hwnd = Hwnd($oIE.hwnd())
Sleep(5000)
if not winexists($hwnd) then exit
_IENavigate($oIE,"www.126.com")

hnzzlzj 发表于 2009-8-30 15:12:59

学习了,其实没事来这个论坛看看还是能 学到好多东西的
页: [1]
查看完整版本: [已解决]如何判断$oIE所对应的进程是否关闭?