Set objShell = CreateObject("Wscript.Shell")
objShell.Run "iexplore.exe www.baidu.com" '打开IE并打开网页www.baidu.com
DataTable.ImportSheet "c:\Local.xls","Local","Action1" '将Local.xls内的Local表插入到Action1内
rowCount = DataTable.GetSheet("Action1").GetRowCount '取得Action1表单中的总行数
For i=1 to rowCount
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("wd").Set DataTable ("ip","Action1") 在wd中输入Action1表单的ip列值
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebButton("百度一下").Click
DataTable.SetNextRow 'Action表的下一行
Next
set WMI=getobject("winmgmts:")
set iexplore=WMI.execquery("select * from win32_process where name='iexplore.EXE'") '查找iexplore.EXE进程
for each pro in iexplore
pro.terminate '结束所有iexplore.EXE进程
next
objShell.Run "iexplore.exe www.baidu.com" '打开IE并打开网页www.baidu.com
DataTable.ImportSheet "c:\Local.xls","Local","Action1" '将Local.xls内的Local表插入到Action1内
rowCount = DataTable.GetSheet("Action1").GetRowCount '取得Action1表单中的总行数
For i=1 to rowCount
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("wd").Set DataTable ("ip","Action1") 在wd中输入Action1表单的ip列值
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebButton("百度一下").Click
DataTable.SetNextRow 'Action表的下一行
Next
set WMI=getobject("winmgmts:")
set iexplore=WMI.execquery("select * from win32_process where name='iexplore.EXE'") '查找iexplore.EXE进程
for each pro in iexplore
pro.terminate '结束所有iexplore.EXE进程
next