[英]Open several tabs in one Internet Explorer window
我正在嘗試創建一個批處理腳本,該腳本在iexplorer中打開2個網站(我需要使用IE)。
問題是,URL是在單獨的IE窗口中打開的。
一個窗口中可以只有2個標簽嗎?
taskkill /im iexplore.exe /f
taskkill /t /f /im chrome.exe
taskkill /t /f /im communicator.exe
ping 127.0.0.1 -n 4
start iexplore.exe http://site1
start iexplore.exe http://site2
start communicator.exe
使用VBScript代碼啟動一個新的InternetExplorer.Application和使用打開的選項卡navigate2
法navOpenInNewTab = 2048標志:
@echo off
findstr /r /c:"^::[^ ]" "%~dpnx0" > "%temp%\openIEtab.vbs"
cscript //b //nologo "%temp%\openIEtab.vbs"
del "%temp%\openIEtab.vbs"
::set IE = CreateObject("InternetExplorer.Application")
::IE.visible = true
::IE.navigate2 "google.com"
::IE.navigate2 "bing.com", 2048
還有一些powershell解決方案( 示例 )。
嘗試在您嘗試打開的第一個網站之后添加一個超時,就像這樣。 超時將等待您在/T
之后設置的秒數,這可能是您要使用ping
命令嘗試完成的秒數,除非您每次都需要ping一個特定的地址。
taskkill /im iexplore.exe /f
taskkill /t /f /im chrome.exe
taskkill /t /f /im communicator.exe
ping 127.0.0.1 -n 4
start iexplore.exe http://site1
TIMEOUT>NUL /T 3 /NOBREAK
start iexplore.exe http://site2
start communicator.exe
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.