How can I read characters from the screen?
#2
(05-05-2022, 09:16 PM)hanness Wrote: Assume that I am initializing my display like this:

        _FullScreen _Off , _Smooth
        _FreeImage oldimage&
        Font& = _LoadFont(FontPath$, FontSize, "MONOSPACE")
        _Font Font&

Now I write a bunch of text to the screen.

Later, I want to read the character at the upper left of the screen. I tried to do this like this:

print screen(1,1)

or

MyVar$ = CHR$(screen(1,1))

However, I'm getting an illegal function call when the line with screen(1,1) is executed.

Is this only valid with screen mode 0 or am I missing something here?

If this cannot be made to work, is there any other way to read characters from the screen?

Post the actual code. The SCREEN function requires the SCREEN be properly sized as a multiple of the font height. Screw that up, and illegal function calls happen at the top of the screen.

Pete
Reply


Messages In This Thread
RE: How can I read characters from the screen? - by Pete - 05-05-2022, 10:02 PM



Users browsing this thread: 1 Guest(s)