Contents of the RAWPRT.TXT file
RAWPRT.WAS -- 11/20/92 (c) DATASTORM TECHNOLOGIES, INC.
Printing characters straight to the printer port in Procomm PLUS for Windows
This script was written to trap all characters from the communitcations
device and send those characters to the printer. Currently, PW receives
the characters, processes the escape sequences and control characters in
the current emulation, and then sends the data to the printer. This causes
some problems with Form Feed characters and printer escape sequences.
Note: This script opens up the printer port as a file and emulates PCPLUS
for DOS version 2.01's printer handling. Be aware that by doing this,
Windows does not know that the printer is being used. You are advised not
to print to this port until PW has finished it's print job. Also, this
script will not recognize redirected printing. If your printer is on the
network, this script will generate a message telling you it cannot open the
Copy this script into your aspect directory, usually C:\PROWIN\ASPECT.
Before you compile this script you will need to modify the Global
definitions to set up the script for your printer. Three parameters are of
interest, PORTNAME, VS_FF, and VS_RESET.
The first define, PORTNAME, tells this script to print to this port name.
It is currently set for "LPT1" which defaults to your first printer port.
The second define, VS_FF, is the string the script sends to the port to
print a Page Eject. Usually the `f is satisfactory, because this causes a
form feed character to be sent to the printer. If you are using a Post
Script printer, find the sequence to eject a page and place it in double
quotes (") here.
The third define, VS_RESET, is the string the script uses to send a reset to
the printer. This string varies with almost all printers, and is
recommended if you print in Windows, then in PW, and back in Windows. The
default string is for the HP Laserjet printers.
Once these changes have been made, you are ready to compile the script.
Follow the procedures in the Aspect Manual to compile this script for PW.
The best way to run this sample is in a Meta Key. So, Type Alt-M to bring
up the Meta Key dialog box. Choose a Meta Key you would like to use as this
print option and enter RAWPRT.WAX in the contents field for the ALT line.
Choose script as the type field and enter n-Raw (where n is the button
number) for the label field.
Choose Save and then Ok to make these changes permanent.
You should see your Meta Key button at the bottom of the Terminal Window.
When you press this button, all data from the port will be sent to the
printer at the same time it's sent to the Terminal Window. To stop
printing, press the Escape Key.
User Script Modifications :
This script allows a programmer to add other processing to this script while
it is printing to the printer. Look for the while loop in the main
procedure and add statements in the while loop to expand this script. (This
step is optional.)
This ASPECT SCRIPT is intended only as a sample of ASPECT programming.
DATASTORM makes no warranty of any kind, express or implied, including
without limitation, any warranties of mechantability and/or fitness for a
particular purpose. Use of this program is at your own risk.