Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does an application exist that will cause the computer to switch (bring in to focus) between two different applications, on a timer? This is for Windows 7.

I need this for a screen that will display publicly to customers. I want the screen to switch between two different applications every, say, 30 seconds. I figure there are enough businesses out there will customer-facing monitors these days that something simple like this must exist!

share|improve this question

5 Answers 5

up vote 8 down vote accepted

Yes, it is called AutoIt.

You would use something like this:

While 1 ;loop indefinitely
    WinActivate("notepad","") ;give focus to notepad
    Sleep(30000) ;sleep 30 seconds
    WinActivate("wordpad","") ;give focus to wordpad
    Sleep(30000) ;sleep 30 seconds
WEnd

WinActivate() gives focus to the window with exact or closest matching title, in cases where there are two that fit, it gives focus to the most recently activated one. Sleep() is in milliseconds, so 30000 is 30 seconds.

share|improve this answer
    
Yep, writing my own AutoIt script was going to be my backup plan and since you saved me some trouble by providing example code I'll just accept your answer. Thanks! –  OverloadUT Aug 24 '11 at 22:05
    
Worked like a charm. I needed to compare two pdf documents and used a cycle of 500ms. To stop it conveniently I bound the ESC button to a terminate function (HotKeySet("{ESC}", "Terminate")) like here: autoitscript.com/autoit3/docs/functions/HotKeySet.htm –  Alexander Taubenkorb May 28 at 5:40

If there will not be any interaction between the customers and the screens/applications, you should simply take a screenshot of the programs and then create a simple slide show with a 30-second timer and endless repeat.

Generally, companies that use customer facing monitors that display programs for advertisement purposes do not use "live" programs. You want to control the interface, and allowing the chance of some error to show is not what you want. They'll record screen videos of the programs working, or simple take screenshots for static display.

Otherwise, there are specific dashboards that are used that display specific information, and these are not switched between, generally. Or, they're switched using A/V equipment so that each program is running on a different computer so as to minimize, once again, the chance of failure.

share|improve this answer
    
I thought of that, but unfortunately one of the applications being switched to dynamically loads content from the web (think RSS reader) so a static image won't work –  OverloadUT Aug 24 '11 at 21:26

AutoTab is very simple.

http://www.analogx.com/contents/download/System/autotab/Freeware.htm

share|improve this answer
    
Simple, straightforward, and AnalogX seems like a nice guy. –  Kirk Broadhurst Aug 21 '12 at 23:44

Why install a program (like AutoIt) when Windows can do this out of the box?

Save the following into a file called auto_switch.vbs:

Option Explicit
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Do
    WScript.Sleep 30000
    WshShell.SendKeys("%{TAB}")
Loop

Change the 30000 to be the number of milliseconds (so 30000 = 30 seconds) between Alt+Tab presses. Double click on it to start it running.

If you want to stop it, then you need to kill the process called "wscript".

If you want to switch between explicitly named programs then this code will flip between "Inbox - Microsoft Outlook" and "Firefox" every 30 seconds:

Option Explicit
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Do
    WScript.Sleep 30000
    WshShell.AppActivate("Inbox - Microsoft Outlook")
    WScript.Sleep 30000
    WshShell.AppActivate("Firefox")
Loop
share|improve this answer
    
Nice. Just curious (I'm not on Windows): why would you need to include "Inbox" for Outlook, but not the page title for Firefox? –  Arjan Jan 11 at 15:58
    
To be honest, I just copied the name of the window titles when I wrote up the example (and Firefox was showing a blank page). According to msdn.microsoft.com/en-us/library/wzcddbek(v=vs.84).aspx, AppActivate will attempt to match an exact window title first and, if it can't, will then go for the first window that begins with that string. –  Richard Jan 12 at 22:41

The following allows you to switch between 6 programs without having to name them. Basically, enter 1 less {TAB} than the number of windows you want to switch between, and don't have any extraneous open windows.

Works for up to 6 windows as far as I know, probably more.

Option Explicit
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Do
  WScript.Sleep 1000
  WshShell.SendKeys("%({TAB}{TAB}{TAB}{TAB}{TAB})")
Loop
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.