home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1994 February
/
psl_9403.zip
/
psl_9403
/
DOS
/
UT_SYSTM
/
CENVI2.ZIP
/
CBPRINT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-11-17
|
643b
|
20 lines
EXTPROC CEnvi
/********************************************************************
*** CBPrint.cmd - Print contents of the clipboard to the printer ***
********************************************************************/
#include <ClipBrd.lib>
ClipText = GetClipboardData(CF_TEXT);
if ( ClipText ) {
printf("Have clipboard text\n");
fp = fopen("\\DEV\\PRN","wt");
if ( fp ) {
fwrite(ClipText,strlen(ClipText),fp);
fclose(fp);
printf("Clipboard text has been sent to the printer.\n");
} else
printf("Error opening printer.\n");
} else
printf("No text data in the clipboard.\n");