Tom
Mon Mar 01 12:52:34 CST 2004
Box drawing characters can be Write(n) to the console with
a simple OpenTextFile("CON", 2).Write, but you need to
restrict the character set to the 'extended' ASCII (aka
IBM PC) character set. For example, to draw a sraight
line, use something like ...
Const cHorz = 196 ' hrizontal
Const cVert = 179 ' vertical
Const cUL = 218 ' upper left corner
Const cUR = 191 ' upper right
Const cLL = 192 ' lower left
Const cLR = 217 ' lower right
with CreateObject("Scripting.FileSystemObject")
set oConsole = .OpenTextFile("CON", 2)
oConsole.Write String(80, Chr(cHorz))
End with
However, this does not permit much cursor control.
Everthing will scroll as with the command prompt. In
addition, color control is not supported with this
approach.
If you 'really' want curso control and colored text,
you'll need to either resort to trickery or require a
third party control (no suggestions).
In the 'trickery' department, I've played with using the
DEBUG.exe utility to write directly to the character
display (virtual machine) memory and posted a couple of
routines that illustrate the techniques. I'd hardly call
them versatile or exhaustive, but they show the basics of
the approach that could be used. Two references are:
http://www.google.com/groups?selm=a2a101c3ec00$d9ee8af0
$a301280a@phx.gb
and
http://www.google.com/groups?selm=575601c3db01$67878210
$7d02280a@phx.gbl
Tom Lavedas
===========
>-----Original Message-----
>Also is there a way to use Unicode characters 2550-255D
to draw boxes on the
>cosole?
>
> "Jeff" <junrue@removethis.hotmail> wrote in message
> Without using a DOM is there a way to change the
foreground and
>background
> color of characters being printed to the console?
Assume my script has
>no
> access to IE.
>
>
>
>
>.
>