getting the text in a console window

getting the text in a console window

Is there a way to get the character that is already at a certain location in a console window?

For example: After opening a console window, one does:



CALL OUTTEXT ('Hello, everyone')


But then let's say you later the text in row 1 may have chaged as part of the program, so you want to know what character is at row 1, column 6. How do you find this out? I was hoping for something like GETTEXT(1,6,string) or something.

Is this possible?


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The example you quote is QuickWin. The text output is not to a console window it is to a program window and is output is as graphics. I do not think there is a screen buffer for the output text, What do yopu want the program to do? It is possible to have a 'console application' with a proper console. It is also possible to create and attach to an existing console from windows or quickwin applications. It might be worth reading the following link before going any further....


Dear APP4619:


Thanks for the link - I had a few old Fortran programs that used to write to the screen using the old DOS commands with the escape characters - not worth translating to Quickwin.

This will give me a day of fun



If the text is printed to a formal console window you can read the text

BOOL WINAPI ReadConsoleOutput(
  _In_     HANDLE hConsoleOutput,
  _Out_    PCHAR_INFO lpBuffer,
  _In_     COORD dwBufferSize,
  _In_     COORD dwBufferCoord,
  _Inout_  PSMALL_RECT lpReadRegion

Jim Dempsey

Leave a Comment

Please sign in to add a comment. Not a member? Join today