task scheduler f2 question

slideways666

Limp Gawd
Joined
Apr 30, 2007
Messages
258
So i want to start a program with the task scheduler and once the program is open-- have the task manager press the f2 button.. I know how to program a event in the task scheduler so that the program starts ---- but i dont know how to make it "press" a hotkey button.. I need the program opened and the equivalent of the f2 key pressed..

Anyone know how to add the f2 key to the task?
 
Not possible with just task scheduler. That type of intelligence isn't built into it.

You'll need to find a way to automate the F2 through a script -- something like vbscript or kixstart should be able to do it.

Once you have the script that works, then you can schedule the launch of the script instead of the program. The script should then launch the program and then press F2.

As a tip -- the sendkeys function is most likely what you'll be using.
 
Thanks D1... I had actually looked around and found a post somewhere that talked about a vbs script--

Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "{F5}"

Just saved it to a notepad page and saved as f2.vbs and fired it off via task scheduler and it worked.. So that seems like a good way to go.. I dont know how to script so dont know how to make it start the program too.. But i can just scheduler the program start vis TS then schedule the vbs to fire 10 seconds later and booommm.. away we go lol.. ghetto i know but it works :)
 
Back
Top