set test = CreateObject("WScript.Shell")
test.SendKeys"%{TAB}"
WScript.Sleep 500
第二行的快捷命令无法使用!有人能帮我吗?
set test = CreateObject("WScript.Shell")
test.SendKeys"%{TAB}"
WScript.Sleep 500
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^%{TAB}"
Set WSHShell = Nothing
WScript.Quit(0)
当您通过批处理文件或CMD运行VBScript时,
一个选项卡将带您回到运行脚本之前的位置
您可能会认为没有任何反应。
尝试使用alt + TAB + TAB
或者更多的选项卡
set test = CreateObject("WScript.Shell")
test.SendKeys"%({TAB}{TAB})"
WScript.Sleep 500
WshShell.SendKeys "^%{TAB}"
Works for me.
要快速在最近使用的应用程序之间切换,请使用:
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "%^{TAB}"
WScript.Sleep 45
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
并使用记事本保存为appswitch.vbs。
在尝试了这里提到的各种方法后,我想出了一些似乎有效的东西。
set wsh = CreateObject("wscript.shell")
wsh.SendKeys "^%({TAB}{TAB})"
wscript.sleep 100
wsh.SendKeys "{ENTER}"
set test =createobject("wscript.shell"):wscript.sleep 500:test.sendkeys"%{TAB}":wscript.echo "Done"
- Hackoo