Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print ascii file ???
Message
De
28/09/1997 02:09:57
 
 
À
27/09/1997 02:07:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041223
Message ID:
00052037
Vues:
53
>>>>where PRINTFIL.BAT contains:
>>>>
>>>>@echo off
>>>>copy /b %1 lpt1
>>>>erase %1
>>>>exit
>>>>
>>>>This copies the file, in binary mode (bypassing any Chr(26)s that it
>>>>sees) to the LPT1 port. You can substitute any valid port for this.
>>>
>>>Does this work with com ports also? I need to send control code out
>>>the
>>>com ports.
>>
>>I haven't tried it with serial ports, but I can't see why it wouldn't
>>work. I've copied other things to plotters (which always seem to be
>>attached serially), and they've worked without a hitch.
>>
>>>Also, is there a way to run the dos in the background
>>>without
>>>the big black ugly screen showing up? I tried setting the props in
>>>the
>>>foxrun.pif to a minimized window, but no luck!
>>
>>I've also found no way to completely remove this from the screen.
>>However, by using WinExec() instead of !, the time is minimized as much
>>as possible.
>>
>>/Paul
>
>There is a way.
>Through Foxpro run the batch file normally. When execution finishes, click on the close button, properties and click the checkbox, Close on exit.
>Then through code use the following command:
>Run /N2
>
>N2 runs the file Minimized. After execution, it closes and you do not see anything.
>
>Abdul Ahad

Thanks Abdul & Paul, very good info!

Now I have some good info, thanks again to the wonderful UT! I was cruising around in the Files section and found the "WIN32API and others APIs" category. In there I found a little library written by Jeremy Pointer called "RawPrint". I tried this with my printer (to which I MUST send control codes) and it worked! In fact I sent about 1 meg of control codes to the thing without a hitch, and without any annoying dos window (it's a .fll library). In this test I loaded all printers into an array using APRINTERS, searched for the first one attached to LPT1, and used it as the printer for the function parameter (even though it was not the printer I wanted to print to it was hooked to LPT1 so it still worked, ie no Windows control codes sent to the printer just mine!). Anyway read his readme file, it easy to use, and see if this works for you. I haven't tried it on com ports yet but I will! I used the VFP5.0a version of the library in my test.

Happy printing!
tc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform