|
Answer» Hi,
I am looking for a batch file that will perform alt+tab function on the keyboard ? :-?
Many Thanks N21RoadieWhat is your goal? There is probably an easier / BETTER WAY to accomplish your final task, but to answer your question, here is a way to Alt+Tab (batch VB from bat) ... just put this code in a .bat or .cmd batch file and run: Code: [Select]@echo off echo set WshShell = CreateObject("WScript.Shell") >alttab.vbs echo WshShell.Sendkeys "%%{TAB}" >>alttab.vbs cscript alttab.vbs del alttab.vbsThanks for the reply,
I want to auto refresh with a script file ran from the task scheduler, the focus on a open program on the desktop,the program in question is a logger program and if the focus goes off the program , it will not record the next hour ?,
Another question is it possible to auto-refresh to that program , if there is other programs open on the desktop ?Code: [Select]@echo off echo set WshShell = CreateObject("WScript.Shell") > Activate.vbs echo WshShell.AppActivate("Window TITLE") >> Activate.vbs wscript Activate.vbs del Activate.vbs
Change Window Title to whatever the logger window uses. Another solution would be to SLEEP the vbscript and at regular intervals LOOP to re-activate the logger application.
Good luck. 8-)
|