Reputation: 18645
We have a program that needs to have its contents refreshed every couple of minutes. The program does it automatically, but only if the program window is selected, which is no use if we are using other programs.
Is there a way with some batch file scripting or vb scripting even to refresh an active window in Windows XP?
Thanks for any help.
Upvotes: 0
Views: 1961
Reputation: 55001
There's the AppActivate method on the WshShellObject class.
Combine that with the Sleep
function and a loop and you might have what you need.
Something like this might work:
Set shell = Wscript.CreateObject("Wscript.Shell")
While 1 = 1
shell.AppActivate("The app title or the process id")
Wscript.Sleep(60000) ' in milliseconds, so this is one minute
Wend
Upvotes: 1