Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to LPT1.DOS
Message
De
31/08/1998 14:26:50
 
 
À
31/08/1998 09:30:34
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00127002
Message ID:
00131612
Vues:
55
Thanks for your help, I'll give it a try.

>>Here's some results, sorry for the delay. I used the same test but used these three copy file commands instead of the one in the original test:
>>
>>copy file (fullpath("readme.txt") to lpt1.dos
>>copy file curd()+"readme.txt" to lpt1.dos
>>copy file "c:\program files\devstudio\readme.txt" to lpt1.dos
>>
>>FPW2.6 works fine in short or long folder if you use c:\progra~1\devstu~1\readme.txt
>>
>>VFP5.0 works fine in folder with short name, get error 'Invalid path or file name' when a folder with a long name is your default
>>
>>VFP6.0 error 'Cannot create file' in either folder. In the short name folder, you can gnore the error and the text will print. In the long name folder, the text will not print even if you gnore the error.
>>
>>I'm wanting to send a text file with embedded control codes to a printer. This could also be a pole display, scales, or any other device that can be connected to parallel or com port but does not have a windows driver. I'm sure I can find a workaround somewhere.
>
>The combination which worked for me in VFP5.0 was
>
>copy file curd()+"tmp.txt " to curd()+"lpt2.dos"
>
>...because I have nothing on LPT2, and it did not complain nor create a file on disk. VFP6 complained altogether, no matter what I tried - always said "cannot create file". My version of VFP6 is DevCon, but I don't think the matter was addressed in any later release - in an OOP world you are not supposed to talk to LPT at all, you should submit your report to a clerk... er, a Print Manager or his secretary or whatever.
>
>If you're interested, I still have a routine which does "Set print to (_port)", and sends any file in chunks of adjustable size to the printer. It bypasses the printer driver (I think so - at least it works under DOS, didn't try it with VFP yet) - email me.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform