Computer Hope
Microsoft => Microsoft DOS => Topic started by: DixiScan on February 03, 2009, 11:30:59 AM
-
Hi all,
My Windows Scheduler has to start some software on my computer, by clicking the Start button.
This Start button is also assigned to the function key F5.
I know how to work with the Scheduler, but is it possible to define a script/command to execute this "F5 press"?
Please help!
Vince
-
It depends on what you are trying to do. Do you have more information about the task?
I don't know of a way to do it with at pure batch file, but if you can use vbscript or wsh to execute your tasks, you can use this code:
Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "{F5}"
Just copy this to a file, and rename it to f5key.vbs. When you run it, it will simulate a keyboard press of the F5 key.
-
Hi, thanks for the answer, but I'm sorry, I can't use vbscript... :-[
The situation is this:
I'm using some software for a measuring equipment on a laboratory.
The equipment is very sensitive for vibrations, so I want to start this device at night, when the cleaners are outside this laboratory...
The fist thought was using Windows Scheduler to give the software a 'cue' to begin the experiment at a certain time, let say 2am.
So, the software is already started up and waiting for this cue to begin.
This can be done with pressing the 'start button' but also with the F5 key on the keyboard. :)
So, now I'm looking for a method to let give Scheduler this F5 command.
Maybe this can be done with a small batch file, that will be executed by the Scheduler at 2am ? ???
-
Execute the F5 key
You can just do it with a screwdriver...
(http://geek9pm.com/ex-f5.jpg)
-
Hi !
Thats great !! Thanks Geek-9pm :D
Is this a normal screwdriver? Or Torx or Philips?
Please give me the color of the shaft, so I can buy the same as you have.
There is one problem: I'm lefthanded, so my F5 key can flip over to the right instead of left.
Hope this will not be a big problem...
Thanks again, and maybe till next time.
Dixi
-
Anyway- why can't you use VBScript? you could use the scheduler to schedule the script to run, and then it would "press f5" for you.
-
Anyway- why can't you use VBScript?
{Whisper: Just act dumb and
BC will do the script for you.}
-
erm- the script was already written by icepick. :)