[已解决]如何判断$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)是不行的。 没人回答,先顶一个 #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") 3# liongodmien
十分感谢,这么简单怎么就没想到呢 简单的东西往往大家想不到... #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") #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") 学习了,其实没事来这个论坛看看还是能 学到好多东西的
页:
[1]