Tuesday, July 20, 2010

Toggle Windows in VBS

This script will allow you to toggle between applications based on Title. This uses the Wscript.Shell Class.  Please view the code below:


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


Do Until Success = True
   On error resume next
   Success = objShell.AppActivate("Untitled - Notepad") 
 Loop


Wscript.quit

No comments:

Post a Comment