VBScript SendKeys CTRL+LWIN+TAB?

血红的双手。 提交于 2019-11-29 10:44:11

Just in case someone land here on these years...
A workaround (instead of sending keystrokes) is to call directly to the application:

Set objShell = CreateObject("Shell.Application")
objShell.WindowSwitcher

This will open Task Switcher Windows App. (Same as ⊞ windows+TAB)

Robin

try this code:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "+(^{LWIN}{TAB})"
RLH

I know you are looking for VBscript but it looks like that is unlikely (pure VBscript). Here is a post that did solve this via C#.

https://stackoverflow.com/a/10367832/1742115

This page tells how to call the C# DLL from your VBscript if you want to keep some of this in vbs.

Helen

I think your question is an example of an XY problem and what you actually want to do is to activate Flip 3D (Switch between windows). You can do this programmatically by executing the rundll32 DwmApi #105 command:

CreateObject("WScript.Shell").Run "rundll32 DwmApi #105"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!