Board index » delphi » LST problem

LST problem

I have used LST in parts of my program, and when I tried to print things
with an exe file, I can get a document in the spool but it just doesn't
print. It works when I run the program in TP7 itself. I wonder what is
wrong?
 

Re:LST problem


Quote
"M1ESK" <casual_man...@yahoo.co.uk> wrote:
>I have used LST in parts of my program, and when I tried to print things
>with an exe file, I can get a document in the spool but it just doesn't
>print. It works when I run the program in TP7 itself. I wonder what is
>wrong?

Are you running under Windows?  If so, it is probably better to
write to a text file device, then close it at the end of the
output.  

var f : text;

assign( f, 'LPT1:');
rewrite( f);

writeln( f, ... );

close( f); - should cause the output to be printed

Re:LST problem


Right, I'll try that.

Quote
"Jud McCranie" <jud.mccra...@mindspring.com> wrote in message

news:1iuagtc80s48fhfmsc6l2a0g08uaigl1kc@4ax.com...
| Are you running under Windows?  If so, it is probably better to
| write to a text file device, then close it at the end of the
| output.
|
| var f : text;
|
|
| assign( f, 'LPT1:');
| rewrite( f);
|
| writeln( f, ... );
|
| close( f); - should cause the output to be printed

Re:LST problem


No, it didn't work. It said "File not found".

Quote
"Jud McCranie" <jud.mccra...@mindspring.com> wrote in message

news:1iuagtc80s48fhfmsc6l2a0g08uaigl1kc@4ax.com...
|
| Are you running under Windows?  If so, it is probably better to
| write to a text file device, then close it at the end of the
| output.
|
| var f : text;
|
|
| assign( f, 'LPT1:');
| rewrite( f);
|
| writeln( f, ... );
|
| close( f); - should cause the output to be printed

Re:LST problem


"M1ESK" <casual_man...@yahoo.co.uk> schrieb im Newsbeitrag
news:990238813.20356.0.nnrp-10.9e98734c@news.demon.co.uk...

Quote
> No, it didn't work. It said "File not found".

> "Jud McCranie" <jud.mccra...@mindspring.com> wrote in message
> news:1iuagtc80s48fhfmsc6l2a0g08uaigl1kc@4ax.com...
> |
> | Are you running under Windows?  If so, it is probably better to
> | write to a text file device, then close it at the end of the
> | output.
> |
> | var f : text;
> |
> |
> | assign( f, 'LPT1:');

without ':'

Quote
> | rewrite( f);
> |
> | writeln( f, ... );
> |
> | close( f); - should cause the output to be printed

hth
Jochen

Re:LST problem


Well, I got the spool coming up this time and it said "Printing" under the
status too, but that's about it, nothing else happened.

Quote
"Jochen" <jote...@hotmail.com> wrote in message

news:9e5qd5$18l0h$1@ID-55934.news.dfncis.de...
|
| without ':'
|
| > | rewrite( f);
| > |
| > | writeln( f, ... );
| > |
| > | close( f); - should cause the output to be printed
|
| hth
| Jochen

Re:LST problem


"M1ESK" <casual_man...@yahoo.co.uk> schrieb im Newsbeitrag
news:990280638.1053.0.nnrp-01.9e98734c@news.demon.co.uk...

Quote
> Well, I got the spool coming up this time and it said "Printing" under
the
> status too, but that's about it, nothing else happened.

[...]

your printer ? windows/gdi or esc/p compatible ? dos-printing enabled ?

try "write(f,#12)" (formFeed) before closing(f);

greetings
jochen

Re:LST problem


Epson Stylus Colour 300, W98 SE, DOS-printing enabled.

Quote
"Jochen" <jote...@hotmail.com> wrote in message

news:9e5ur7$19fg6$1@ID-55934.news.dfncis.de...
|
| your printer ? windows/gdi or esc/p compatible ? dos-printing enabled ?
|
| try "write(f,#12)" (formFeed) before closing(f);
|
| greetings
| jochen

Re:LST problem


"M1ESK" <casual_man...@yahoo.co.uk> schrieb im Newsbeitrag
news:990282045.1650.0.nnrp-01.9e98734c@news.demon.co.uk...

Quote
> Epson Stylus Colour 300, W98 SE, DOS-printing enabled.

should work. afaik sc300 ist esc/p2 compatible like all(?) epsons.

jochen

Quote

> "Jochen" <jote...@hotmail.com> wrote in message
> news:9e5ur7$19fg6$1@ID-55934.news.dfncis.de...
> |
> | your printer ? windows/gdi or esc/p compatible ? dos-printing
enabled ?
> |
> | try "write(f,#12)" (formFeed) before closing(f);
> |
> | greetings
> | jochen

Re:LST problem


THIS CODE WORKS

program test;

uses wincrt, windos;

var f:text;
i:integer;

begin
assign(f,'LPT2');
rewrite(f);
for i:= 1 to 20 do
writeln(f,i:10,'asdfasdfasdfasdf');
write(f,#12);
close(f);
end.

Thanks I was having ths same probnlem more or less

On Sat, 19 May 2001 16:26:17 +0200, "Jochen" <jote...@hotmail.com>
wrote:

-"M1ESK" <casual_man...@yahoo.co.uk> schrieb im Newsbeitrag
-news:990282045.1650.0.nnrp-01.9e98734c@news.demon.co.uk...
-> Epson Stylus Colour 300, W98 SE, DOS-printing enabled.
-
-should work. afaik sc300 ist esc/p2 compatible like all(?) epsons.
-
-jochen
-
->
->
->

Quote
-> "Jochen" <jote...@hotmail.com> wrote in message

-> news:9e5ur7$19fg6$1@ID-55934.news.dfncis.de...
-> |
-> | your printer ? windows/gdi or esc/p compatible ? dos-printing
-enabled ?
-> |
-> | try "write(f,#12)" (formFeed) before closing(f);
-> |
-> | greetings
-> | jochen
->
->

Re:LST problem


Not for me though.

"John P trotter" <johntrot...@programmer.net> wrote in message
news:efsdgtov59akhp1j410d2ojcgi814b4sci@4ax.com...
|
| THIS CODE WORKS
|
| program test;
|
| uses wincrt, windos;
|
| var f:text;
| i:integer;
|
| begin
| assign(f,'LPT2');
| rewrite(f);
| for i:= 1 to 20 do
| writeln(f,i:10,'asdfasdfasdfasdf');
| write(f,#12);
| close(f);
| end.
|
| Thanks I was having ths same probnlem more or less

Re:LST problem


The only difference should be - where is our printer??

On Sun, 20 May 2001 02:35:16 +0100, "M1ESK"

Quote
<casual_man...@yahoo.co.uk> wrote:

-Not for me though.
-
-
-
-"John P trotter" <johntrot...@programmer.net> wrote in message
-news:efsdgtov59akhp1j410d2ojcgi814b4sci@4ax.com...
-|
-| THIS CODE WORKS
-|
-| program test;
-|
-| uses wincrt, windos;
-|
-| var f:text;
-| i:integer;
-|
-| begin
-| assign(f,'LPT2');
-| rewrite(f);
-| for i:= 1 to 20 do
-| writeln(f,i:10,'asdfasdfasdfasdf');
-| write(f,#12);
-| close(f);
-| end.
-|
-| Thanks I was having ths same probnlem more or less
-

Re:LST problem


Mine's a local printer for local people.

"John P trotter" <johntrot...@programmer.net> wrote in message
news:jl2ggtcj8p6716vtbs89ud04jjqaj6qrli@4ax.com...
|
| The only difference should be - where is our printer??

Other Threads