Restored from previous forum. Originally posted by pbdep.
Hello PB Team,
Support for Console mode (Windows and LINUX!)
Is the folowing an option in PB?
OpenFile(stdio,#myconsole$)
WriteString("ESC[32;mThis would be nice")
The above write Binary to the stdio. ASNI is an example but could
be anything usefull in binary.
Hope its an Idea.
Greetings,
Norman.
[Implemented] OpenFile() Binary
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
OpenConsole()
PrintN("ESC[32;mThis would be nice")
Also, don't Windows and Linux have a special console file handler? You could try using somethng like:
; For Windows
OpenFile(#myconsole, "CON:")
WriteString("ESC[32;mThis would be nice")
; For Linux
OpenFile(#myconsole, "/dev/tty0")
WriteString("ESC[32;mThis would be nice")
I doubt the device names are correct though.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Have you tried something like this?Originally posted by pbdep
The above write Binary to the stdio. ASNI is an example but could
be anything usefull in binary.
OpenConsole()
PrintN("ESC[32;mThis would be nice")
Also, don't Windows and Linux have a special console file handler? You could try using somethng like:
; For Windows
OpenFile(#myconsole, "CON:")
WriteString("ESC[32;mThis would be nice")
; For Linux
OpenFile(#myconsole, "/dev/tty0")
WriteString("ESC[32;mThis would be nice")
I doubt the device names are correct though.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by pbdep.
I tried, but dont seem to get it working overhere on windows
probably someting i do wrong or PB does not support
the opening of CON or PRN ? would be strange by the way...
Ill keep on trying
Norman.
Hi tinman,Originally posted by tinman
Have you tried something like this?Originally posted by pbdep
The above write Binary to the stdio. ASNI is an example but could
be anything usefull in binary.
OpenConsole()
PrintN("ESC[32;mThis would be nice")
Also, don't Windows and Linux have a special console file handler? You could try using somethng like:
; For Windows
OpenFile(#myconsole, "CON:")
WriteString("ESC[32;mThis would be nice")
; For Linux
OpenFile(#myconsole, "/dev/tty0")
WriteString("ESC[32;mThis would be nice")
I doubt the device names are correct though.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
I tried, but dont seem to get it working overhere on windows
probably someting i do wrong or PB does not support
the opening of CON or PRN ? would be strange by the way...
Ill keep on trying

Norman.
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Perhaps my suggestion was a poor one. I thought CON: (or something like that) was a standard device under Windows. Maybe not.Originally posted by pbdep
I tried, but dont seem to get it working overhere on windows
probably someting i do wrong or PB does not support
the opening of CON or PRN ? would be strange by the way...
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by pbdep.
I must have been sleeping
This works fine ->
print ( chr(27)+"[2j" )
Norman.
Originally posted by tinman
Perhaps my suggestion was a poor one. I thought CON: (or something like that) was a standard device under Windows. Maybe not.Originally posted by pbdep
I tried, but dont seem to get it working overhere on windows
probably someting i do wrong or PB does not support
the opening of CON or PRN ? would be strange by the way...
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
I must have been sleeping

This works fine ->
print ( chr(27)+"[2j" )
Norman.
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by pbdep.
I was working on a linux ANSI console...
Norman.
Not so silly...you need ansi.sys or nansi.sys enabled for DOS console.Originally posted by plouf
silly question but suppose this ESC]32; do some kind of color/type format because i see this characters here (XP) in console ?
Christos
I was working on a linux ANSI console...
Norman.