Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VBScript for Alt-Tab after fixed duration?

  • 24-01-2011 05:35PM
    #1
    Registered Users, Registered Users 2 Posts: 83 ✭✭


    Folks,

    Could anyone tell me how i can create a simple VBScript that will cycle through five or six open and maximised windows in XP (various apps such as IE8, VLC, Visio, etc.,) and exit when I press the Esc key?

    At the moment, I'm using the following, but I can't quit it without logging out...
    "Option Explicit
    Dim objShell
    Set objShell = CreateObject("WScript.Shell")
    Do
    objShell.SendKeys "%+{TAB}"
    Wscript.Sleep 9000
    Loop"

    Also, the time (which I think is "9000" does not bear any resemblance to seconds or minutes. Is there any other means of determining the duration between the Alt-Tabs?

    Thanks a million in advance,

    Brian
    P.S. the purpose of this is to cycle between KPI screens, network map and other metrices at our helpdesk office.


Comments

  • Closed Accounts Posts: 23,718 ✭✭✭✭JonathanAnon


    I did a quick google and found this app

    http://www.autohotkey.com/

    one person has suggested that using with the following code will do exactly what you need it to do..
    Loop {
    Send {Alt down}{Tab down}{Alt up}{Tab up}
    Sleep 60000 ; wait 60 seconds
    }


Advertisement