Is there a way to read the screen buffer?

78 views
Skip to first unread message

Cep

unread,
Jan 10, 2008, 11:03:43 AM1/10/08
to jBASE
Hi

I'm relative new to jBase and I have some Ideas that I would like to
carry out, but some of these ideas needs to be able to read what is
already written on the screen. We are using terminal and terminal
programs (as TeraTerm).

In the very old days reading the memory was enough - But .... yeah
right now I don't know how.

In the easy MS-DOS days the screen had two bytes of data for each
character shown on screen. By reading these you could see what was
written on the screen - da... it's a long time ago ;-)

Simon Verona

unread,
Jan 10, 2008, 11:09:48 AM1/10/08
to jB...@googlegroups.com
This isn't available from jBASE directly - it doesn't memory map the screen
at all.

However, some telnet emulators (accuterm maybe?) may have some way of
reading back what's displayed.

Simon


Hi


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

Simon Verona.vcf

Jim Idle

unread,
Jan 10, 2008, 11:28:41 AM1/10/08
to jB...@googlegroups.com
You could call the curses library rather than use CRT (which just sends
to the device and that's that). Asking the terminal to tell you the
screen contents is going to be terrible. Curses will however do anything
you require and lots more. It is a fair amount of work to define the
whole curses library as C functions for jBC (I know because I have done
it), but you can much more easily program a few C functions that do what
you want, but use the curses (ncurses is best in fact) libraries to
achieve it.

Jim

> -----Original Message-----
> From: Cep [mailto:C.St...@cook-wce.com]
> Sent: Thursday, January 10, 2008 8:04 AM
> To: jBASE
> Subject: Is there a way to read the screen buffer?
>
>

Brad Moll

unread,
Jan 10, 2008, 1:03:34 PM1/10/08
to jB...@googlegroups.com

I running jBase 3.4.4.2 on a Redhat Linux 7.2 platform

Does anyone know why I would be getting the following error:

Warning: Unable to open error message file '/usr/jbc/jbcmessages' for
message 'SUBROUTINE_OVF'

It seems to be very intermittent and usually scrolls by with about 20 lines
of the same thing when it does happen.

TIA,

Brad Moll


Jim Idle

unread,
Jan 10, 2008, 1:25:10 PM1/10/08
to jB...@googlegroups.com
It means that the SUBROUTINE_OVF message is either not the correct
message number (jBASE problem), or that you are running in a context
where you don't have permissions to open /usr/jbc/jbcmessages (the error
message is favoring that).

However, what the error message would tell you is that your subroutine
call depth has exceeded the allowed maximum. As this is something like
512 (make 256 maybe 1024 - I no longer remember), then it is almost
certainly a bug in your software, unless you were deliberately trying to
use recursion in subroutines, which is OK up to a point.


Jim

Brad Moll

unread,
Jan 10, 2008, 1:56:54 PM1/10/08
to jB...@googlegroups.com
Jim,

Thanks for the help. I will search that option. The processes where I am
seeing this error should not be calling anything to a depth that should be a
problem, but I can review that. Is there any utility that will tell me the
subroutine depth at any point and time, either from within or outside of a
program?

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf Of

Jim Idle

unread,
Jan 10, 2008, 8:30:18 PM1/10/08
to jBASE
I think that one of the SYSTEM() calls will tell you the stack depth, but I no longer remember which one. Unless it is a user exit or something. I no longer remember, but have given this information on this list before so perhaps whoever is using it can remind us ;-)

Daniel Klein

unread,
Jan 11, 2008, 11:08:37 AM1/11/08
to jB...@googlegroups.com
On jBASE 3.4 OCONV('','U0016') returns the 'call stack' so you can use this to check the stack depth.

Dan

On Jan 10, 2008 8:30 PM, Jim Idle < ji...@temporal-wave.com> wrote:

I think that one of the SYSTEM() calls will tell you the stack depth, but I no longer remember which one. Unless it is a user exit or something. I no longer remember, but have given this information on this list before so perhaps whoever is using it can remind us ;-)

Tom Turkington

unread,
Jan 11, 2008, 11:47:36 AM1/11/08
to jB...@googlegroups.com
This from Danny Ruckel a couple of years ago:

Tom

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf Of
Danny Ruckel
Sent: Friday, October 07, 2005 8:08 AM
To: jB...@googlegroups.com

Subject: RE: Finding out what program called a subroutine


SYSTEM(1000) I believe shows the calling program.

You can see the entire call stack with the user exit OCONV('','U0016'),
e.g.,
PROGRAM.STACK=OCONV('','U0016')

Danny

Ramo

unread,
Feb 6, 2008, 1:13:43 AM2/6/08
to jBASE
Hi
It is possible to read the screen buffer,
Here is how:

Develop a program in Visual Basic (6 or .NET) and use
from PowerTCP 2 ActiveX: Terminal emulator (Vt) and Telnet,
place a textBox on the Form1,

In the sub Telnet1.Receive
add:

Telnet1.Receive s
Vt1.Display s
txtScreenBuffer.Text = s

Download the powerTCP as trial, they have a sample with this, you only
need to add the textbox, you can even save the screen buffer.


Regards





and you will see in the textbox the screen buffer,
> > > Brad Moll- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Tuber

unread,
Feb 8, 2008, 6:13:33 PM2/8/08
to jBASE
You probably want to use a terminal emulator that support scripting.
Write your script in whatever language the terminal emulator
supports. What is the larger issue you are trying to solve?
Are you trying to convert the terminal style interface to a
windows style interface?
Are you trying to dump data from a report to disk?
Reply all
Reply to author
Forward
0 new messages