2016-07-27 40 views
-1

如何在一個窗口中和同一選項卡上反覆運行此腳本(例如10次)?在同一選項卡和窗口中運行腳本

list = Array("example.com") 
Set ie = CreateObject("InternetExplorer.Application") 
ie.Visible = True 


For Each url In list 
    ie.Navigate url 
    While ie.ReadyState <> 4 
    Wend 
    wscript.sleep 100000 

Next 
+0

您編輯的循環來做到這一點使用迭代次數。 – mulla

回答

1
Const RepeatCount = 10 

Dim i As Integer 

List = Array("example.com") 
Set ie = CreateObject("InternetExplorer.Application") 
ie.Visible = True 

For i = 1 To RepeatCount 

    For Each URL In List 
     ie.Navigate URL 
     While ie.ReadyState <> 4 
     Wend 
     wscript.sleep 100000 

    Next 

Next 
相關問題