Get screen contents

Is there any way to get the contents of a screen based on its position (and length). I am using ApplinX version 5.2.4 and would like to get the contents of a screen from column 1 to 10 in row 1 for a screen that is generated using the “instant” method.
Thanks is advance.

I need some more information about what you are trying to accomplish, the way you want to do it and the final result.
If you can add screen shots it would be great also.
Kind regards,

Thanks for the response. I am using ApplinX to render mainframe screens using the “instant” method i.e. I have no equivalent aspx web page for the screen that is being rendered by the ApplinX framework. I want to be able to get contents of the mainframe screen at a certain row and column. For instance, say that the string “MAP1” appears on the mainframe screen in row 2 starting at column 1. How do I retrieve that value? I intend using an event in the GXBasicWebForm class to get the string from the screen. I know that there are ways to get the field contents of mapped screens, but I want to get the contents of an unmapped screen.

Hi Yuben,
What you should do is get the screen buffers from the GX session and extract whatever you want from it.
Here is code example (.NET - GXBasicWebForm):
In OnInit - add this line:

gx_appConfig.getSessionConfig().addVariable(GXBaseObjectConstants.GX_VAR_RETURN_SCREEN_BUFFERS, GXBaseObjectConstants.GX_VAR_VAL_BUFFERS_SCREEN_DATA);

After base.OnInit(e);
And in user_postConnect add this code:

GXScreenBuffers gxsb = new GXScreenBuffers();
gxsb = (gx_session.getScreen().getBuffers(true));

This will fill the variable gxsb with the screen content.
You can then use some sub string function in order to retrieve any sub string you want from it according to the position you want.
Hope this will do the job,

Hi Asaf,
Thanks, your solution worked. Is this documented in the ApplinX documentation? I searched but could not find anything. Maybe I’m looking at the wrong documents!
Your prompt assistance is appreciated.

You are right and there is no information about it in the documentation.
This is because getting the screen buffers is not the recommended way and we do not encourage using it.
For instance in your case it seems that you are trying to use the first 10 characters of the screen in order to find out what screen is it.
But there’s a better way to do that. One can define new screen group and enable the check box ‘Apply to all unidentified screens’ > then create new field mapping for the specific values (in your case row 1 column 1 - 10) > and investigate this field by code.
If you will need any more help we are here :slight_smile: