Batch file that changes URL in open browser

后端 未结 2 701
北荒
北荒 2021-01-07 08:25

I\'ve seen something like this:

start /d \"C:\\Program Files\\Internet Explorer (x86)\\IEXPLORE.EXE\" www.google.com

But this just opens a

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-07 09:01

    You may use SendKeys directly in your Batch file, as shown in this or this or this answer; for example:

    @if (@CodeSection == @Batch) @then
    
    @echo off
    
    rem Start default IE
    start /d "C:\Program Files\Internet Explorer (x86)\IEXPLORE.EXE" www.google.com
    
    :changeLoop
    CScript //nologo //E:JScript "%~F0" "keys to change to first webpage"
    timeout /T 10
    CScript //nologo //E:JScript "%~F0" "keys to change to second webpage"
    timeout /T 10
    goto changeLoop
    
    @end
    
    WScript.CreateObject("WScript.Shell").SendKeys(WScript.Arguments(0));
    

提交回复
热议问题