VBS 网页批量另存为

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Function SaveWebPage()
    Set web = CreateObject("InternetExplorer.Application")
    web.Visible = True
    For i=1 to 10
    Dim WshShell
    set  WshShell = CreateObject("WScript.Shell")
    url="www.baidu.com"
    web.Navigate url
    do
      Wscript.sleep 2000
      loop until web.readystate=4
      Wscript.sleep 1000
      WshShell.AppActivate(i)
      WshShell.SendKeys "%F"
      WshShell.SendKeys "A"
      WshShell.SendKeys i
      WshShell.SendKeys "{ENTER}"
      WshShell.SendKeys "%F"
      WshShell.SendKeys "C"
    Next
End Function
posted @ 2011-06-16 00:42  Sirrah  阅读(1383)  评论(0编辑  收藏  举报