|
Windows 3.x was shipped with an extremely useful utility
called "Recorder" that allowed you to record sequences
of keystrokes, mouse moves and mouse clicks. You can then
assign your recorded sequences to hot keys so that all you
need to do to play back a long sequence is press a single
hot key. The Recorder program can be found in your Accessories
program group in Window 3.1. Recorder is probably the single
most time saving utility on your PC but unfortunately it
is also the least understood and least used accessory. In
fact, Microsoft does not even provide Recorder as part of
Windows 95 or later because they found that hardly anyone
was using it in Windows 3.1. (Unfortunately, the 16 bit version
of Recorder that is shipped with Windows 3.1 does not work
in Windows 95 or NT so if you are running Windows 95/98 or
NT/2000 this discussion will be of little value.) Because
the Recorder program allows you to assign macros to a single
hot key keystrokes, you could invoke a Recorder macro from
the Wedge by placing the hot key keystroke for a Recorder
macro in either the "Record Preamble Keystrokes" or
the "Field Postamble Keystrokes" when you define
your "Input Data Record Structure" in the Wedge.
You could also use the "Pre-Transfer Character Translation
Table" to translate specific characters that might appear
in your serial data to keystrokes that invoke different Recorder
macros. Using the Wedge in combination with the Recorder
thus allows you to do practically anything you can imagine
with the data coming in the serial port. For example you
could set up the Wedge and Recorder so that whenever a specific
character was received through the serial port, an entire
sequence of operations took place including opening and closing
applications, deleting files, etc.. If you can do it manually
then Recorder can automate the job for you with a macro and
the Wedge can send the necessary hot keys to invoke the macro.
For example, if you had the Wedge set up to send keystrokes
to NotePad and you also wanted to send the data to the Windows
Write (WordPad in Windows 95) you could use the following
procedure:
Set up the Wedge in "Send Keystrokes" mode specifying
the NotePad program as the target for all keystrokes from
the Wedge. Next, configure the Wedge to work with your serial
device and then add the following characters to the end of
the "Field Postamble Keystrokes" for the very last
data field that you have defined in the Wedge:
+({LEFT}{HOME})^{INSERT}{DOWN}%{TAB}+{INSERT}
Activate the Wedge and then launch the Write program followed
by the NotePad program. At this point NotePad has the focus
and is therefore at the top of the Window list with the Write
program directly underneath it. When you input data from
your device, it will be sent to both NotePad and Write. The
keystrokes: +({LEFT}{HOME}) means hold the shift key while
pressing the left arrow and the home key. This selects all
text in the current line. The keystrokes: ^{INSERT} means
Ctrl+Insert and causes all selected text to be copied to
the clipboard. The {DOWN} keystroke that follows is there
to simply de-select the currently selected text. The keystrokes:
%{TAB} means Alt-Tab and causes Windows to switch the focus
to the Write program. Finally, the keystrokes: +{INSERT}
means shift+insert and performs the job of pasting the data
from the clipboard into the Write program.
To send the data to three Windows programs at a time you
could use the following "Field Postamble Keystrokes":
+({LEFT}{HOME})^{INSERT}{DOWN}%{TAB}+{INSERT}%{TAB
2}+{INSERT}
More Cool Wedge Tricks
|