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!

Term/2014

Status
Not open for further replies.

ttzzee

Programmer
Nov 2, 2005
2
0
0
US
Need Help
My sub-program code
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 will not work with W-XP when print it on network printer
 
Try using lpt3 like this:

NET USE LPT3 \\COMPUTERNAME\PRINTERNAME /PERSISTENT:YES
This is the command you'll have to issue in the xp dosbos or in a batchfile.

Then in your program you can use lpt3, or try to use:


set printer to \\COMPUTERNAME\PRINTERNAME
instead of set print to lpt2

Rob.
 
Hi ttzzee!

For end users I put a shoprtcut to DOS batch file on desktop. Batch file goes like this:
...
@echo off
net use lpt2: /delete
net use lpt2: \\computername\printername
@echo on
pause

My apps still use old clipper summer 87 compiler, so I can access only lpt1 and lpt2 port but this runs quite good. Whenever communication is lost (for some only billy knows reason) user just runs this shortcut and things are back in place.

Hope I helped
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top