Batch file to switch between browser tabs

2019-06-11 06:52发布

I have two browser tabs running monitoring applications on a screen. I want to automate switching between tabs after lets say every 2 mins. I think this can be achieved by creating a scheduled task in windows which execute a batch file every 2 mins. Batch file will switch the tab. I need help creating such batch file. Thanks.

1条回答
Animai°情兽
2楼-- · 2019-06-11 07:47

You can use VBScript to do that,

Example for IE :

Create a file Switch.vbs with this :

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.AppActivate "Internet Explorer"
Wscript.Sleep 1500
WshShell.SendKeys "^{TAB}"
Wscript.Sleep 1500

After opening your 2 tabs in IE run the command every 2 minutes :

wscript.exe switch.vbs
查看更多
登录 后发表回答