|
Program
Operations
Have you ever had
a problem where launching and focusing a program on one computer
works each and every time, but on a different one it does not,
unless you change the macro?
Launching a program with Macro
Express is a simple task, just use the Program Launch command.
If the program is there, it will launch. However, gaining reliable
focus of the just-launched program is something else altogether.
If you are creating macros for other people, or you have multiple
computers, there are too many things that are outside of your
control, which can spell success or failure - lack of memory,
number of tasks currently running, processor speed, small caches,
different operating systems, etc. - all affect your macro's
ability to run.
Efficient settings on one computer
may be deficient on another, so how can you be sure that a program
will launch and gain focus whichever computer it runs on? You
cannot, not without customizing the macro for each computer.
Meaning, of course, that you will be managing separate macros
for each person or having them adjust the macro you supplied
until it runs reliably. As an alternative, you could design
for the worst case scenario, which is an awe-inspiring idea
for the guy with the worst case computer, but will drive your
other users absolutely bananas.
The real solution is to use a
complete function in place of the single line Program Launch
command. And that my friends, is what the functions in the category
are all about. Program Operations functions are designed to
launch, focus, and terminate programs, in a reliable manner,
on computers with differing capabilities.
But wait, there is more! You
can also keep a log of specific events when attempting to launch
a program unattended. This can be used as a debugging tool to
determine where exactly the launch failed
and why, or
simply as a history log. It is especially handy for unattended
operations when things simply do not go right. If you have an
operation that runs unattended, say overnight, and it inconsistently
fails, you can check the event log to see what is occurring
to cause failure.
Each event is appended to the
end of the log and contains a date and time stamp. Use event
logging to not only record when a macro begins and ends, but
for anything else in between. Record commands, variables, time,
current folders, titles, windows, etc. There is no limit on
what you may record. And best of all, recording will not slow
your macro significantly, uhm, unless of course you log an event
for every line in the macro.
The Program Operations category
comprises twelve functions, which handle launching, focusing,
and terminating programs in a reliable manner, in addition to
having a few helpful utility functions thrown into the mix.
{ Program - Launch } Launches
a program and sets focus to it
{ Program - Focus } Sets focus to a program that is already
running
{ Program - Terminate } Terminates a running program
{ Program - Validate Launch Values } Checks that the launch
values fall within acceptable limits
{ Program - Validate Verification Values } Checks that the verify
values fall within acceptable limits
{ Program - Validate Termination Values } Checks that the termination
values falls within limits
{ Program - Toggle Parameter Validation } Toggles the ValidateParameters?
value on and off
{ Program - Toggle Exact Match } Toggles the ExactMatch? value
on and off
{ Program - Toggle Event Logging } Toggles the LogEvent? value
on and off
{ Program - Log Event } Records the event string to the log
file.
{ Program - Reset } Resets Program Operations values back to
default values
{ Program - Clear Error Flag } Resets the ReturnError? value
back to zero after an error
Examples
{ Program Operations Example A }
{ Program Operations Example B }
{ Program Operations Example C }
{ Program Operations Example D }
{ Program Operations Example E }
{ Program Operations Example }
Next: Date
and Time
|