[fpc-pascal]Reading the screen
Matthew Bradford
bigmatt19 at aol.com
Thu Sep 28 20:45:04 CEST 2000
Jim,
I looked around the docs and couldn't find anything that would help you,
however, I think I still may have a solution for you.
If you want to write something to the console you can write a wrapper
for the writeln procedure that would do the following:
1. behave like the current write/writeln procedures do
2. in addition, keep track of all screen writes in an array
eg. var Screen[1..80,1..25] of char;
Now, that could get kind of tricky when you start throwing in windows
and such. But, for straight screen writing and no fancy stuff, that
should do the trick. Also, it wouldn't be all that hard to write it so
that the array would totally mimic the screen.
A second option, is pick up an assembler book and call the interupt that
will return that info for you. (A word of caution on that though.
Interupts are slow, so if speed is important, that would not be the way
to go. Also, the use of assembler makes your program very non-portable.
However, if neither of those are a concern for you it would probably be
easier.)
Perhaps one of the more experienced people with FPC will have better
insight into a way to do this that is already built into the language.
Matt
James_Wilson at i2.com wrote:
> Does anyone know how to read characters from a text-mode win32/go32
> program? I need to gotoxy and read some information, but I can't figure out
> how.
>
> TIA...
>
> Jim
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list