[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Xy4 and cold feet



That's news to me. I thought all printers nowadays are
winprinters. All my printers work with NET USE. What maybe is required is
a router, or something to give meaning to the network command. Okay,
since I'm now typing on a laptop (at 36,000 feet and 600mph winging over
the Rockies, yet connected to the web!), here's the whole
shebang:

You need to determine your computer's name re the network and the printer's name re the network. How to do this isn't self-evident; here's how, in XP at least
My Computer/Properties/Computer Name
Printers & Faxes/[select the printer you want to use]/Properties/Sharing/

Then the sticky part: you have to get the syntax EXACTLY right. And even when you do, things get fussy. But if all is well, here's what you type at the command prompt, using my own computer-name printer-name combo:


NET USE LPT1 \\Lita\HP4050 /Persistent:YES

Doesn't have to be LPT1, but make sure that Xy thinks it's printing to the LPT number you select (this is in SETTINGS.DFL for those using Xy4).

Doesn't have to have the Persistent switch--that just (supposedly, but not actually) keeps things intact following re-boot.
NET USE with no arguments shows the current state of assignments. In some cases you have to delete a printer in order to then get the NET USE to work. So I have a little U2 routine that does that for my 2 printers and a network alias for my wife's computer on the net. In pseudo-XP, it's:
{{5netuse}} Re-establish lost printer connections--October 5, 2010
[02]BX dos/nv/x/z /c net use lpt1 /deleteQ2 ;*; delete any old LPT1
BX dos/nv/x/z /c NET USE LPT1 \\Lita\HP4050 /Persistent:YESQ2;*;
BX dos/nv/x/z /c net use lpt2 /deleteQ2 ;*; delete any old LPT2
BX dos/nv/x/z /c net use lpt2 \\Lita\Epson1 /Persistent:YESQ2 ;*;
BX dos/nv/x/z /c net use J: /delete é;*; delete old J:
BX dos/nv/x/z /c net use J: \\Mookie\C /Persistent:YesQ2 ;*;
BX dos/nv /c c:\mailhbl\netuse.batQ2 ;*; This is just to display results
[02]

Netuse.bat is two lines:

net use
pause

You need to use a bat file to show the results because otherwise Xy erases them as soon as it finishes and exits DOS.






Not if you happen to be stuck with a winprinter-- NET USE isn't useful then, in my experience.

Paul Lagasse

On 03/15/2011 05:11 PM, Harry Binswanger wrote:
I beg to differ. Net use in DOS makes it dead easy and transparent.

Sent from my iPhone

On Mar 15, 2011, at 12:24 PM, Paul Lagasse  wrote:

On 03/15/2011 02:27 PM, Nicholas Clifford wrote:
At the risk of going over ground much gone over before, can anyone point me to an easy way to print DOS (like Xy4) through a USB connection? Sorry for the repetition.
Nothing's entirely easy. And the solution may depend on your printer. Though I no longer use the following methods (since I work in Linux), these did work for me in WinXP, and once set up they were easy to use. The first solution prints faster where Xy4 is concerned, if that matters:

1. For Xy4, you can go to http://users.datarealm.com/xywwweb/; eudora="autourl">http://users.datarealm.com/xywwweb/ and get and install the latest version of XyWWWeb.U2, following the instructions there, and then set up Xy4 to use typ --

2. More generally, see http://www.columbia.edu/~em36/wpdos/usbprint.html; eudora="autourl">http://www.columbia.edu/~em36/wpdos/usbprint.html -- the PrintFile method described here also works with XyWrite, though I think when I tried it out I had to install ghostscript and ghostview into folders whose paths did not include spaces, ie c:\gs and c:\gsview. If it works for WPDOS and Xy4 it can probably work for other DOS apps.

If you want to know more about typ before embarking on the process of setting it up, here's the info from the XYWWWEB.INF file:

{typ}

Print file with Ghostscript  RJH 5/29/06

Overcome inability to print with WinXP, non-PCL, USB printers, etc.

Required files/packages:
DL either Ghostscript AFPL v8.53+ (http://www.cs.wisc.edu/-
>>    ghost/index.html) or GPL v8.15+
   (http://voxel.dl.sourceforge.net/sourceforge/ghostscript/gs815w32.ex
>>    e) (basic fonts are included in package -- be sure to click the box
   "Install Fonts" during Setup)
POSTGHST.PRN (http://users.datarealm.com/xywwweb/postghst.zip; eudora="autourl">http://users.datarealm.com/xywwweb/postghst.zip): add to the
   PP: stanza of DFL
KMD.EXE (http://users.datarealm.com/xywwweb/WIN95CMD.ZIP; eudora="autourl">http://users.datarealm.com/xywwweb/WIN95CMD.ZIP), installed in DOS
   Path (preferably in BootDrive:\WINDOWS|WINNT\system32)

Printer drivers are compiled into Ghostscript (not separate files).
   One printer driver must be specified in XyWWWeb.REG (see
   UserVariable GsPrnDev, below). To determine the *name* of an
   appropriate printer driver to specify, see:
   a list of Ghostscript printer devices and the printers with which
   they are compatible:
http://www.cs.wisc.edu/ghost/doc/printer.htm; eudora="autourl">http://www.cs.wisc.edu/ghost/doc/printer.htm
   a list of printer drivers:
http://www.cs.wisc.edu/ghost/doc/AFPL/devices.htm; eudora="autourl">http://www.cs.wisc.edu/ghost/doc/AFPL/devices.htm
   and "Details of Ghostscript output devices":
http://www.cs.wisc.edu/ghost/doc/cvs/Devices.htm#Win; eudora="autourl">http://www.cs.wisc.edu/ghost/doc/cvs/Devices.htm#Win
   If you find a printer driver, make SURE that it is compiled into
   Ghostscript! Command: "GSWIN32C -? |more"
   If no printer driver seems compatible with your printer, generic
   driver "mswinpr2" is available, which works (slowly) with ALL
   PRINTERS(!) that can print under Windows.

PRiNter file POSTGHST.PRN now supports A4 printing. See comments in
   POSTGHST.PRN (SEarch for "A4")

To use TYP, the current XyWrite PRiNter file must be a Postscript PRN.
   You may use a different PRN than POSTGHST.PRN, but it *must* have a
   filename beginning with the four letters "POST..." (all XyWrite
   PostScript PRNs are filenamed "POSTsomething.PRN"). Be aware that
   POSTGHST.PRN is specifically set up for Ghostscript fonts, whereas
   factory PRNs are not -- you will need to adapt them manually. Add
   the PS PRN file to the PP: stanza of DFL. Establish it as the
   current PRN using the SETP command, e.g. in STARTUP.INT (the LOAD
   command works too, but eats memory).
Two or three entries in XyWWWeb.REG must be completed (one-time
   procedure):
1.the fully-qualified d:\path\filename for GSWIN32C.EXE (the
   Ghostscript command line executable) in Ghostscript_EXE_Win32 e.g.:
         Ghostscript_EXE_Win32=F:\GS\gs8.53\bin\GSWIN32C.EXE
2.the name of the printer device driver you will use in GsPrnDev (add
   this UserVariable to REG's [Ghostscript] stanza if it is not already
   present), e.g.
GsPrnDev=ljet4
   A specific printer device driver will print hands-off to the default
   printer specified in the Windows Printer control panel, unless you
   indicate a different printer in UserVariable WinPrinter, below.

   If no specific driver for your printer is available, you must use
   the generic driver "mswinpr2". You have two options: 1) you can use
   the default printer specified in your Windows Printer control panel,
   for hands-off printing, with this command:
GsPrnDev=mswinpr2 default
   or 2) you can summon the Set Printer dialog each time you print, and
   manually select a printer (or accept the default) ==>  then hit "OK":
GsPrnDev=mswinpr2 dialog
   The "dialog" option requires that you complete the Set Printer
   dialog, and it also affords the option of setting other Printer
   properties, or even of Canceling the print job (in which latter case
   only you will need to manually close a Ghostscript desktop window).
3.(optional) the name of one physical printer to which frame TYP will
   always print (hands-off), whether it is the current "Default
   Printer" or not, in WinPrinter, e.g.:
         WinPrinter=EPSON Stylus C60 Series
         WinPrinter=\\PSNYC\HPLaserJ
   The name of the printer should be written exactly as it appears in
   the Windows Printer control panel. If it is still not recognized,
   run Printers.VBS (command at DOS: "cscript //nologo Printers.VBS"),
   which reports all valid printer names accurately.

Usage:
All available arguments to the normal TYF (or PRINTF) command are
   legal (except "target_filename", which is nonsensical here):
TYP [d:\path]filename][,,page_ranges][,o|e|p]
   e.g.:
TYP     Print current file
TYP ,,2/4       Print current file pages 2 and 4
TYP MYFILE      Print MYFILE
TYP MYFILE,,-3  Print MYFILE pages 1-3
TYP MYFILE,,3-9,O       Print MYFILE Odd-numbered pages
   3,5,7,9
You must confirm (y|N) printing of DeFined text

--paul lagasse


Harry Binswanger
hb@xxxxxxxx