实现AU3自动搜的时候出现错误,怎么改进?
本帖最后由 chen0769 于 2009-10-28 08:12 编辑C:\Documents and Settings\Administrator\桌面\au3.jpg
有没有可能实现运行1200次之后自动关闭?怎么样可以设置运行一次的时间?
代码~
#include <IE.au3>
$oIE = _IECreate ("www.baidu.com",0,0,1,0);打开一个ie,输入百度网址
_IEPropertySet ($oIE, "toolbar", 0)
_IEPropertySet ($oIE, "width", 800)
_IEPropertySet ($oIE, "height", 600)
_IEPropertySet ($oIE, "resizable", 0)
_IEPropertySet ($oIE, "title","我打开的百度,我做 主")
_IEPropertySet ($oIE, "statustext","欢迎访问 与 au3 hi.baidu.com/iokey")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery1 = _IEFormElementGetObjByName ($oForm, "wd")
_IEFormElementSetValue ($oQuery1, "与 au3")
_IEFormSubmit ($oForm,1)
_IEAction ($oIE, "visible")
Sleep(5000)
MsgBox(0,"提醒","确定退出IE")
_IEAction ($oIE, "quit") 本帖最后由 maxkingmax 于 2009-10-27 21:28 编辑
其实将程序主体放在循环中就可以实现运行1200次的目的,至于时间嘛,是不是间隔时间,如果是用 Sleep()#include <IE.au3>
for $i=1 to 1200
$oIE = _IECreate ("www.baidu.com",0,0,1,0);打开一个ie,输入百度网址
_IEPropertySet ($oIE, "toolbar", 0)
_IEPropertySet ($oIE, "width", 800)
_IEPropertySet ($oIE, "height", 600)
_IEPropertySet ($oIE, "resizable", 0)
_IEPropertySet ($oIE, "title","我打开的百度,我做 主")
_IEPropertySet ($oIE, "statustext","欢迎访问 与 au3 hi.baidu.com/iokey")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery1 = _IEFormElementGetObjByName ($oForm, "wd")
_IEFormElementSetValue ($oQuery1, "与 au3")
_IEFormSubmit ($oForm,1)
_IEAction ($oIE, "visible")
Sleep(5000)
MsgBox(0,"提醒","确定退出IE")
_IEAction ($oIE, "quit")
sleep(5000)
next 谢谢哈~~俺小菜鸟在这里多谢啦~~
页:
[1]