Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

0C to PRN ?

3 views
Skip to first unread message

Benny Pedersen

unread,
Jan 20, 2002, 9:19:58 PM1/20/02
to

Hi,

I got an e-mail from one who asked me about a printer, as this:

One noted problem occurs though; the
printer's resume must be activated each
occurrence to start the printing process even
though the data is loaded in its buffer. I'm
assuming that it needs some sort of
end-of-page command, but I don't know of any
to use.
---
Since I'm moving (I have rent a room another place), then I have
already moved my printer to the new place to live from February,
so, I can't test the following answer that I wanted to e-mail. ?

ECHO::>%temp%.\~.tmp
ECHO::EXIT|%COMSPEC%/kPROMPT,rcx$_3$_e0,c,d,a$_w0$_q|DEBUG,%temp%.\~.tmp>NUL
COPY %temp%.\~.tmp PRN > NUL
DEL %temp%.\~.tmp
CLS
@:EXIT

Does it works?

Benny Pedersen,
http://users.cybercity.dk/~bse26236/

Todd Vargo

unread,
Jan 20, 2002, 10:40:55 PM1/20/02
to

"Benny Pedersen" <b.ped...@get2net.dk> wrote in message
news:RUK28.234$c36....@news.get2net.dk...

Yes, it works, Benny. This single line does too. ;-)

@ECHO::EXIT|%COMSPEC%/kPROMPT,nPRN$_rcx$_3$_e0,c,d,a$_w0$_q|DEBUG>NUL

--
Todd Vargo (body of message must contain my name to reply by email)


Benny Pedersen

unread,
Jan 21, 2002, 12:57:32 AM1/21/02
to

"Todd Vargo" <t...@birdlover.com> wrote news:a2g3e8$10o9gj$1...@ID-25025.news.dfncis.de...

Thanks!

Benny,
--Here's a super menu

@%1 %0 :: 1 2 3 4 5 6 7 8 9 Done GOTO:EOF
@ECHO off
FIND.EXE/i " %%%%c"<%0>CON
FOR %%^ in (1 2 3) do ECHO. ^
CHOICE/n/t0,85/c1234567890 -- Case no --^
CLS
FOR %%s in (2 3 4 5 6 7 8 9 10 11 12) do IF NOT errorlevel %%s SHIFT
FOR %%g in (1 2 3 4 5 6 7 8 9 EOF:) do IF errorlevel %%g GOTO %%g
:1
FOR %%c in (%1 :: echo) do %%c Perform FOR commands (case 1), %0.
:2
FOR %%c in (%2 C: echo) do %%c Testing -- %1
:3
FOR %%c in (%3 D: dir ) do %%c
:4
:5
:6
:7
:8
:9
:EOF

Benny Pedersen

unread,
Jan 21, 2002, 1:08:21 PM1/21/02
to

"Todd Vargo" <t...@birdlover.com> wrote news:a2g3e8$10o9gj$1...@ID-25025.news.dfncis.de...
>
> "Benny Pedersen" <b.ped...@get2net.dk> wrote in message
> news:RUK28.234$c36....@news.get2net.dk...
> >
snip

> Yes, it works, Benny. This single line does too. ;-)
>
> @ECHO::EXIT|%COMSPEC%/kPROMPT,nPRN$_rcx$_3$_e0,c,d,a$_w0$_q|DEBUG>NUL
>

Very good! So, we can do things without writing TEMP files.
I tried to make one with DEBUG CON and whitout setting variables.

The two long lines (prefixed with %3) should be in only one line, as
in (F E D C B A 9 8 7 6 5 4 3 2 1 0) do
but would be wrapping in the transmission.

DEBUG LPT1 may be used instead of the previours nPRN

Benny,

@%1 %2 %0 CALL ::
@ECHO off
%1 ECHO. Input two digits (hex). --For example "0C" or "C."
%1 CHOICE/n/c.0123456789.......abcdef>NUL
%2 CHOICE/n/c.0123456789.......abcdef %4
%3 FOR %%{ in (F E D C B A 9 8) do IF errorlevel }%%{ %0 :: %1 %1 %4%%{
%3 FOR %%{ in (7 6 5 4 3 2 1 0) do IF errorlevel }%%{ %0 :: %1 %1 %4%%{
ECHO::EXIT|%COMSPEC%/kPROMPT,rcx$_5$_e0'%4('%4').'$_w0$_q|DEBUG CON>NUL
GOTO EOF

Todd Vargo

unread,
Jan 21, 2002, 6:13:37 PM1/21/02
to

"Benny Pedersen" <b.ped...@get2net.dk> wrote

> --Here's a super menu
>
> @%1 %0 :: 1 2 3 4 5 6 7 8 9 Done GOTO:EOF
> @ECHO off
> FIND.EXE/i " %%%%c"<%0>CON
> FOR %%^ in (1 2 3) do ECHO. ^
> CHOICE/n/t0,85/c1234567890 -- Case no --^

^^^^^^^
That's a very strange way to present a menu. <g> It's only confusing if 4
thru 0 is pressed. <G>

Todd Vargo

unread,
Jan 21, 2002, 6:15:23 PM1/21/02
to

"Benny Pedersen" <b.ped...@get2net.dk> wrote

> Very good! So, we can do things without writing TEMP files.
> I tried to make one with DEBUG CON and whitout setting variables.
>
> The two long lines (prefixed with %3) should be in only one line, as
> in (F E D C B A 9 8 7 6 5 4 3 2 1 0) do
> but would be wrapping in the transmission.

The sentance above is misleading (confused me anyways). I took is as meaning
the two lines beginning with %3 should be on a single line. But when I ran
the batch, it only allowed a single keystroke.

>
> DEBUG LPT1 may be used instead of the previours nPRN
>
> Benny,
>
> @%1 %2 %0 CALL ::
> @ECHO off
> %1 ECHO. Input two digits (hex). --For example "0C" or "C."
> %1 CHOICE/n/c.0123456789.......abcdef>NUL
> %2 CHOICE/n/c.0123456789.......abcdef %4
> %3 FOR %%{ in (F E D C B A 9 8) do IF errorlevel }%%{ %0 :: %1 %1 %4%%{
> %3 FOR %%{ in (7 6 5 4 3 2 1 0) do IF errorlevel }%%{ %0 :: %1 %1 %4%%{
> ECHO::EXIT|%COMSPEC%/kPROMPT,rcx$_5$_e0'%4('%4').'$_w0$_q|DEBUG CON>NUL
> GOTO EOF

^^^^^^^^
This adds to the confusion because either way (single %3 or 2 %3 lines), it
returns the familiar "label not found" error message. Well, there were 2
CRLF's following that line, so I guess it didn't get truncated in transit.
So what's it there for? Left over garbage from testing?

Buddy

unread,
Jan 21, 2002, 7:12:33 PM1/21/02
to
what about going to the dos prompt and using the edit.com?

you press ctrl+P then alt+12 save the file as eject.txt or whatever.

in a batch file you type: copy eject.txt prn

"Benny Pedersen" <b.ped...@get2net.dk> wrote in message
news:RUK28.234$c36....@news.get2net.dk...
>

Benny Pedersen

unread,
Jan 21, 2002, 6:56:50 PM1/21/02
to

"Todd Vargo" <t...@birdlover.com> wrote news:a2i8ua$11ds46$2...@ID-25025.news.dfncis.de...
^^^^^^
^^^^^^

@%1 %2 %0 CALL ::
@ECHO off
%1 ECHO. Input two digits (hex). --For example "0C" or "C."
%1 CHOICE/n/c.0123456789.......abcdef>NUL
%2 CHOICE/n/c.0123456789.......abcdef %4
%3 FOR %%{ in (F E D C B A 9 8 7 6 5 4 3 2 1 0) do IF errorlevel }%%{ %0 :: %1 %1 %4%%{

Benny Pedersen

unread,
Jan 21, 2002, 10:49:16 PM1/21/02
to

"Todd Vargo" <t...@birdlover.com> wrote news:a2i8ua$11ds46$2...@ID-25025.news.dfncis.de...
>
> "Benny Pedersen" wrote

Yes, the GOTO EOF was either garbage or just a line to
make an error message (I give you only one guess), :-)

@%1 %2 %0 CALL :: "F E D C B A 9 8 7 6 5 4 3 2 1 0" CON$_rcx$_7$_e
@ECHO off
%1 ECHO.-- Input two digits (hex),
%1 CHOICE/n/c.0123456789.......abcdef>NUL
%2 CHOICE/n/c.0123456789.......abcdef %6
%5 FOR %%{ in ("%3") do IF errorlevel }%%{ %0 :: %1 %3 %4 %1 %6%%{
ECHO::EXIT|%COMSPEC%/kPROMPT n%40' %6 ('%6 ') '$_w0$_q|DEBUG>NUL

:: ^
Benny Pedersen,
PS.
Try substitute the CON in line no one with TMP or PRN
BTW. to better see, remove the
$_rcx$_7$_e
from line no one into the last line between n%4 and 0'

The execution order handled by the prefixed parameters, are
%1 the input message along with choice
%5 errorlevel
%2 then the second Choice
%5 and the errorlevel
and finaly the last line with :EXIT.

Okay, I know that both William, Outsider and you can run the
above batch in about 5 seconds in the head but I don't know who
else is reading this our CON PRN stuff.

I also assume that you can see that no variables is to be cleared
and that no TEMP files are used except those written
by DOS itself. Ehhhm, I also assume that you knew why I did put the
two extra parameters into the batch because of the wrapping lines.

BTW. I nice thing about my new
"2 digits input routine" (all lines except the last one), is
that if one would say 02 but said 2 (forgot the zero),
then 2 followed by a dot (2.) would be accepted as a valid input.
:-)

Benny


Todd Vargo

unread,
Jan 22, 2002, 7:35:27 PM1/22/02
to
Benny,

> Okay, I know that both William, Outsider and you can run the
> above batch in about 5 seconds in the head but I don't know who
> else is reading this our CON PRN stuff.

Sometimes I just run them because I don't have time. :-/

> I also assume that you can see that no variables is to be cleared
> and that no TEMP files are used except those written
> by DOS itself. Ehhhm, I also assume that you knew why I did put the
> two extra parameters into the batch because of the wrapping lines.

Don't know why, but, I automatically assume all your batches are for
dbl_click operation. ;-)

Batch on!

Outsider

unread,
Jan 24, 2002, 2:41:53 AM1/24/02
to
Todd Vargo wrote:
>
> Benny,
>
> > Okay, I know that both William, Outsider and you can run the
> > above batch in about 5 seconds in the head but I don't know who
> > else is reading this our CON PRN stuff.

I try not to - I get a headache!



> Sometimes I just run them because I don't have time. :-/

:D



> > I also assume that you can see that no variables is to be cleared
> > and that no TEMP files are used except those written
> > by DOS itself. Ehhhm, I also assume that you knew why I did put the
> > two extra parameters into the batch because of the wrapping lines.
>
> Don't know why, but, I automatically assume all your batches are for
> dbl_click operation. ;-)

...snipped

Arrrg. Yes, definitely the wrong perspective on batch programming.
If Benny knew about the command line, he would not be filling the
command history with :EXIT's, nor would he be using CLS, PAUSE, and
EXIT at the end of batch programs. Most irritating!

It seems as if Benny appoached batch files backwards right from the
start. That's what happens when a full fledged point-&-clicker decides
to learn batch from the GUI and doesn't know the DOS prompt. I think
William Allen has a similar problem.

No offense intended, I just tell it like it is in my opinion.

--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Communicator 4.08
Line Counting --a programmer's disease.

Outsider

unread,
Jan 24, 2002, 2:41:53 AM1/24/02
to
Todd Vargo wrote:
>
> Benny,
>
> > Okay, I know that both William, Outsider and you can run the
> > above batch in about 5 seconds in the head but I don't know who
> > else is reading this our CON PRN stuff.

I try not to - I get a headache!


> Sometimes I just run them because I don't have time. :-/

:D



> > I also assume that you can see that no variables is to be cleared
> > and that no TEMP files are used except those written
> > by DOS itself. Ehhhm, I also assume that you knew why I did put the
> > two extra parameters into the batch because of the wrapping lines.
>
> Don't know why, but, I automatically assume all your batches are for
> dbl_click operation. ;-)

...snipped

Arrrg. Yes, definitely the wrong perspective on batch programming.
If Benny knew about the command line, he would not be filling the
command history with :EXIT's, nor would he be using CLS, PAUSE, and
EXIT at the end of batch programs. Most irritating!

It seems as if Benny appoached batch files backwards right from the
start. That's what happens when a full fledged point-&-clicker decides
to learn batch from the GUI and doesn't know the DOS prompt. I think
William Allen has a similar problem.

No offense intended, I just tell it like it is in my opinion.

--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Communicator 4.08
Line Counting --a programmer's disease.

========= WAS CANCELLED BY =======:
From: Outsider <nonvali...@yahoo.com>
Control: cancel <3C4FBAC1...@yahoo.com>
Subject: cmsg cancel <3C4FBAC1...@yahoo.com>
Date: Mon, 28 Jan 2002 01:50:36 GMT
Message-ID: <cancel.3C4FB...@yahoo.com>
X-No-Archive: yes
Newsgroups: microsoft.test,alt.flame.niggers,alt.msdos.batch
NNTP-Posting-Host: w088.z064003087.lax-ca.dsl.cnc.net 64.3.87.88
Lines: 1
Path: news.uni-stuttgart.de!nntp.cs.uni-magdeburg.de!fu-berlin.de!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!sjc-feed.news.verio.net!sea-feed.news.verio.net!news.verio.net!msrnewsc1!cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp07!u&n&a&c&anceller
Xref: news.uni-stuttgart.de control:40721920

This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers.

0 new messages