Vbscript 使用脚本在特定时间间隔的IE浏览器选项卡之间切换

Vbscript 使用脚本在特定时间间隔的IE浏览器选项卡之间切换,vbscript,scripting,browser-automation,ie11-developer-tools,Vbscript,Scripting,Browser Automation,Ie11 Developer Tools,目前我正在使用IE11,我打开了4个显示器。我想在选项卡之间切换特定的时间间隔。我们希望此设置用于监视目的。我需要这个任务的脚本 请参考以下代码: set shellApp = createobject("shell.application") do for each sTitle in Array("v9", "Google", "Gmail", "ETC") ShowIEWindow sTitle, shellApp, 10 ' sec next loop ' forev

目前我正在使用IE11,我打开了4个显示器。我想在选项卡之间切换特定的时间间隔。我们希望此设置用于监视目的。我需要这个任务的脚本

请参考以下代码:

set shellApp = createobject("shell.application")

do 
  for each sTitle in Array("v9", "Google", "Gmail", "ETC")
    ShowIEWindow sTitle, shellApp, 10 ' sec
  next
loop ' forever

sub ShowIEWindow(sTitle, oShell, nWaitsec)
  for each w in oShell.windows
      with w
        if lCase(.LocationName) = lcase(sTitle) and InStr(lCase(.FullName),"iexplore") > 0then
          w.Refresh
          'w.visible = true ' show
          wsh.sleep nWaitsec * 1000 ' milliseconds
         ' w.visible = false ' hide
        end if
      end with
  next
end sub
如果在internet explorer中打开阵列中指定的选项卡,上述代码将刷新这些选项卡

现在,您需要找到在不同选项卡之间切换的方法,而不是刷新窗口


我还测试了上述代码并为我工作。希望这会有帮助!!:)

请参考以下代码:

set shellApp = createobject("shell.application")

do 
  for each sTitle in Array("v9", "Google", "Gmail", "ETC")
    ShowIEWindow sTitle, shellApp, 10 ' sec
  next
loop ' forever

sub ShowIEWindow(sTitle, oShell, nWaitsec)
  for each w in oShell.windows
      with w
        if lCase(.LocationName) = lcase(sTitle) and InStr(lCase(.FullName),"iexplore") > 0then
          w.Refresh
          'w.visible = true ' show
          wsh.sleep nWaitsec * 1000 ' milliseconds
         ' w.visible = false ' hide
        end if
      end with
  next
end sub
如果在internet explorer中打开阵列中指定的选项卡,上述代码将刷新这些选项卡

现在,您需要找到在不同选项卡之间切换的方法,而不是刷新窗口

我还测试了上述代码并为我工作。希望这会有帮助!!:)