ESC-Codes and Windows-XP

ESC-Codes and Windows-XP

Post by Franz Baka » Sat, 24 Mar 2007 01:35:50


Hi,

on OS/2 I can use

/*rexx*/
bd = esc||'[1m' /* bold */
no = esc||'[0m' /* normal */
SAY "Text:" bd||bold text||no||"normal text"

to display characters bold or normal.

Using the same code on Windows-XP this does not work.
Is there a trick to make this work?

TIA for hints
Franz
 
 
 

ESC-Codes and Windows-XP

Post by Gil Barmwa » Sat, 24 Mar 2007 02:27:21


Check out the excellent discussion in this NG from 2005:
http://www.yqcomputer.com/ #48c6343c3a59458e

Gil Barmwater

 
 
 

ESC-Codes and Windows-XP

Post by Seymour » Sat, 24 Mar 2007 04:18:38

In < XXXX@XXXXX.COM >, on 03/22/2007
at 04:35 PM, Franz Bakan < XXXX@XXXXX.COM > said:


Search the windoze documentation for ANSI; I don't know whether m$
supports ANSI terminal controls or not.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT < http://www.yqcomputer.com/ ~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to XXXX@XXXXX.COM
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Sat, 24 Mar 2007 06:24:19


| Hi,
|
| on OS/2 I can use
|
| /*rexx*/
| bd = esc||'[1m' /* bold */
| no = esc||'[0m' /* normal */
| SAY "Text:" bd||bold text||no||"normal text"
|
| to display characters bold or normal.
|
| Using the same code on Windows-XP this does not work.
| Is there a trick to make this work?
|
| TIA for hints

Using RC/REXX, I can define the colors to use
for any piece of text being displayed, and it
doesn't change the whole screen (as far as
colors).

The same code does NOT work under Rregina nor
R4. Both of these interpreters seem to use a
different interface to the software that "writes"
to the console.

If anyone is using PC/REXX, I can supply the code
that allows multiple colors to be used in displaying
a message(s). The code supports much more then
specifying a color(s), such as indenting, boxing
(single, double, or user specified characters),
right/left/center justification, blank lines before
and/or afterwards, clearing the screen,
beeps (sound), block writing, prompting, scale and/or
a ruler, splitting up the message into multiple
lines, etc. I can also supply the extensive help
for the command. ___________________________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Sat, 24 Mar 2007 07:58:50


|> Is there a trick to make this work?

| Search the windoze documentation for ANSI; I don't know whether m$
| supports ANSI terminal controls or not.

As I mentioned in another post, R4 and Regina doesn't
support the ANSI terminal controls because they use
a different interface, while PC/REXX does. I can
make use of the escape codes to colorize different
portions of the message text (16 colors).

I wish REGINA would use the same interface that
PC/REXX does. Two other things that work for
PC/REXX is that is doesn't strip off commented
fields that are bounded with " (double quote),
and it actually passes on the return code from
DOS commands. _________________________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Sat, 24 Mar 2007 09:04:24


| on OS/2 I can use
|
| /*rexx*/
| bd = esc||'[1m' /* bold */
| no = esc||'[0m' /* normal */
| SAY "Text:" bd||bold text||no||"normal text"
|
| to display characters bold or normal.
|
| Using the same code on Windows-XP this does not work.
| Is there a trick to make this work?

When I fixed your code with:
/*rexx*/
esc='1c'x
.
.
.


and used PC/REXX, it worked fine. However, R4 and
Regina just munged it up. The code with PC/REXX
worked with both COMMAND.COM and CMD.EXE
using Windows/XP (home and pro). ___________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Franz Baka » Sat, 24 Mar 2007 20:13:37


I also have this in my rexx code, just forgot to
include it into the sniplet.


Ok, I only tried with Object-Rexx-311 and this aloso did not work...
Now my question:

Where to download/get PC/REXX? (I don't use the 'Object'-Features of
Object-Rexx)

Franz
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Sun, 25 Mar 2007 01:36:39


|> When I fixed your code with:
|> /*rexx*/
|> esc='1c'x

| I also have this in my rexx code, just forgot to
| include it into the sniplet.
|
| > and used PC/REXX, it worked fine. However, R4 and
| > Regina just munged it up. The code with PC/REXX
| > worked with both COMMAND.COM and CMD.EXE
| > using Windows/XP (home and pro). ___________Gerard S.
|
| Ok, I only tried with Object-Rexx-311 and this aloso did not work...
| Now my question:
|
| Where to download/get PC/REXX? (I don't use the 'Object'-Features of
| Object-Rexx)

PC/REXX (or Personal Rexx as it's now called) is available
from Quercus Systems and is at

http://www.yqcomputer.com/

It can't be downloaded. You must contact the author, and
not free. ______________________________________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Sun, 25 Mar 2007 02:01:20


||> When I fixed your code with:
||> /*rexx*/
||> esc='1c'x
|
|| I also have this in my rexx code, just forgot to
|| include it into the sniplet.
||
|| > and used PC/REXX, it worked fine. However, R4 and
|| > Regina just munged it up. The code with PC/REXX
|| > worked with both COMMAND.COM and CMD.EXE
|| > using Windows/XP (home and pro). ___________Gerard S.
||
|| Ok, I only tried with Object-Rexx-311 and this aloso did not work...
|| Now my question:
||
|| Where to download/get PC/REXX? (I don't use the 'Object'-Features of
|| Object-Rexx)
|
| PC/REXX (or Personal Rexx as it's now called) is available
| from Quercus Systems and is at
|
| http://www.yqcomputer.com/
|
| It can't be downloaded. You must contact the author, and
| not free. ______________________________________Gerard S.


More info for Personal/REXX from Quercus Systems:

http://www.yqcomputer.com/

discusses the cost of the product and ordering information.

For you CMS users, it also hast a LISTFILE, GLOBALV,
EXECIO, MAKEBUF, and DROPBUF commands. _________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Mark » Sun, 25 Mar 2007 10:42:56


Here is an archived News thread that might be of interest perhaps.
http://www.yqcomputer.com/
 
 
 

ESC-Codes and Windows-XP

Post by Franz Baka » Wed, 28 Mar 2007 22:43:56


...

OK thanks for all your input. So I either have to buy
PC/Rexx or ... open a feature request for OO-Rexx and hope
that OO-Rexx will get a switch to support ANSI terminal controls
one day in the future.

Franz
 
 
 

ESC-Codes and Windows-XP

Post by mecej » Thu, 29 Mar 2007 06:20:40


The command window does not support ANSI escape sequences in any recent
version of Windows.

However, the Cygwin Bash window does; if you can tolerate using Bash
commands instead of Cmd commands, this is a solution.

-- mecej4
 
 
 

ESC-Codes and Windows-XP

Post by Gerard Sch » Thu, 29 Mar 2007 08:28:31


|> Hi,
|>
|> on OS/2 I can use
|>
|> /*rexx*/
|> bd = esc||'[1m' /* bold */
|> no = esc||'[0m' /* normal */
|> SAY "Text:" bd||bold text||no||"normal text"
|>
|> to display characters bold or normal.
|>
|> Using the same code on Windows-XP this does not work.
|> Is there a trick to make this work?


| The command window does not support ANSI escape sequences in any recent
| version of Windows.
|
| However, the Cygwin Bash window does; if you can tolerate using Bash
| commands instead of Cmd commands, this is a solution.

Not true. I've been using ANSI excape sequences for
Windows/95 (all flavors), Windows/98 SE, and
Windows/XP (HOME and PRO).

This includes colors (16 colors), bold, reverse video and
such.

I've written a REXX program to display messages (text)
to the screen that can display any parts of the
message(s) in different colors (16). If anybody is
still using PC/REXX or Personnal REXX, I'd be glad to
ship them a copy, including all the documenation. It
also works on CMS, but there, the whole messages(s)
are written in just one color (8 colors), and of
course, on all systems, the original screen color
is preserved.

I also used to set the function keys in all versions
of Microsoft (DOS) Windows, but Windows/XP doesn't
support these anymore.

I use PC/REXX (or Personal Rexx).

R4 and REGINA don't use the same interface(s) that
PC/REXX uses, and can't make use of the escape
sequences. Of course, you need to make the
ANSI.SYS driver resident [TSR] (and specify the /X
option also). It seems that the Microsoft people
don't want you to know too much about the ANSI.SYS
driver, and they seemed to place it (as I remember)
somewhere strange ... but that's what a
DIR ansi.sys /S command is for.
______________________________________________Gerard S.
 
 
 

ESC-Codes and Windows-XP

Post by Gert van d » Thu, 29 Mar 2007 16:24:12

In article < XXXX@XXXXX.COM >, Gerard46
@rrt.net says...


I couldn't find any info about it but what does the /X option do?
 
 
 

ESC-Codes and Windows-XP

Post by Gert van d » Thu, 29 Mar 2007 16:37:33

In article < XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says...
And I've tried the short example from the OP (with and without the /X
option) but with ooRexx it doesn't work. Is there anything special that
needs to be done with ooRexx on XP?