Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Printer to LPT1 errors 1

Status
Not open for further replies.

1991Clip

Programmer
Feb 5, 2003
4
0
0
US
My DOS code has worked for many years. I recompiled recently to add a couple of cosmetic fixes.

Now - the SET PRINTER TO LPT2 command gives

TERM/2014 error. Create error: \\LPT2.prn. DOS error 123

Strange, however, if I compile a small program with just the SET PRINTER TO LPT2 with a few lines to print, all is well.

The compile and link scripts are the same!!

the Set( 24, ...) does not work either!

ANY HELP appreciated
Sharad
 
Switched to W-XP I guess? some 3rd party libs are not very compatible with XP I found out myself, the hard way :-(

What lib's do you use with your app?

HTH
TonHu
 
Your small program work well because default path is null.

Try this (strange, but work):
local OldSet Set(SET_DEFAULT, "")
...
SET PRINTER TO LPT2
SET DEVICE TO PRINTER
SET CONSOLE OFF
print ....
SET DEVICE TO SCREEN
SET CONSOLE ON
...
Set(SET_DEFAULT, OldSet)

Valderrama
CEMI - Ayto. Málaga
 
Hello, Every one who can answer. Thanks
This my sub-program
SPTR=1
SCRMESS=SAVESCREEN(10,15,18,65)
SET COLOR TO W+/R
@ 10,15 CLEAR TO 15,45
@ 10,15 TO 15,45 DOUBLE
@ 11,20 SAY 'SELECT PRINTER OUTPUT'
@ 13,18 PROMPT 'NETWORK'
@ 13,28 PROMPT 'LOCAL'
@ 13,37 PROMPT 'ABORT'
MENU TO SPTR
SET COLOR TO GR+/B
SET PRINT TO
IF sptr = 1
set print to lpt2
ENDIF
if sptr = 3
store 5 to sptr
endif
SET COLOR TO (CLRMON)
RESTSCREEN(10,15,18,65,SCRMESS)
RETURN
**
It does not work on netwrok printer with W-XP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top