Here is a
last resort method of doing it and it may not work with all non-Microsoft programs because of communication problems. Now suppose the three buttons can be activated not only by clicking but by pressing ALT-A, ALT-B, and ALT-C, respectively. Also assume the program's Exit button can be clicked or you can press ALT-X.
Create an Access database with one form on it. Put a checkbox and make sure its default value is FALSE (or UNchecked). Set the form's Timer Interval to, say, one hour. Then on the On Timer event code that if the current time is, say, after midnight, then execute the following:
Code:
Dim dblRetVal as Double
If Not Me.chkDone Then
dblRetVal = Shell("C:\Q-PULSE\Q-PULSE.EXE", 3)
If dblRetVal = 0
Msgbox "Q-PULSE has encountered an error.", vbExclamation, "Error!"
Else
SendKeys "%A", True 'First Button
SendKeys "%B", True 'Second Button
SendKeys "%C", True 'Third Button
SendKeys "%X", True 'Exit Button
End If
Me.chkDone = True
End If
Open the database and form and leave it open while you're gone. After it runs, the checkbox will be true and the code will not run again.
Notes: The directory and EXE file in the SHELL function will probably be named something else. Check Q-PULSE's buttons and see if they have labels with one letter underlined. If so, it probably means that to activate that button without clicking, you can press ALT- and that letter. Use those letters instead of A, B, C, and X in my example.
If you buttons cannot be activated through the keyboard via ALT keys, you may have to use the SENDKEY function like this
Code:
SendKeys "{TAB}{TAB}{ENTER}", True 'Tab to the correct button & press it
SendKeys "{TAB}{ENTER}", True 'Tab to the next button & press it
You'll have to open Q-PULSE manually and count the correct number of tabs to code.
This is messy and, again, it's last resort.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division