批处理文件可在浏览器选项卡之间切换 [英] Batch file to switch between browser tabs

查看:277
本文介绍了批处理文件可在浏览器选项卡之间切换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个浏览器选项卡,它们在屏幕上运行监视应用程序.我想让每2分钟说完一次后在标签之间自动切换.我认为可以通过在Windows中创建计划任务来实现,该任务每2分钟执行一次批处理文件.批处理文件将切换选项卡.我需要创建此类批处理文件的帮助.谢谢.

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.

推荐答案

您可以使用VBScript来做到这一点,

You can use VBScript to do that,

IE的示例:

使用以下命令创建一个文件Switch.vbs:

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

在IE中打开2个标签后,每2分钟运行一次命令:

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

wscript.exe switch.vbs

这篇关于批处理文件可在浏览器选项卡之间切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆