BeSly Software Solutions About yab Demos About us Admin


getscreen$() -- returns a string representing a rectangular section of the text terminal


*** requires ncurses support compiled in ***
See Documentation/Advanced for info.


The getscreen$ function returns a string representing the area of the screen as specified by its four arguments (which specify two corners). I.e. everything you have printed within this rectangle will be encoded in the string returned (including any colour-information).
Like most other commands dealing with advanced text output, getscreen$ requires, that you have called clear screen before.

clear screen 

for a=1 to 1000: 
	print color("red") "1" 
	print color("green") "2" 
	print color("blue") "3" 
next a  
print at(10,10) " Please Press 'y' or 'n'! "
putscreen screen$,10,10 

This program fills the screen with coloured digits and afterwards asks the user for a choice ( Please press 'y' or 'n'! ). Afterwards the area of the screen, which has been overwritten by the question will be restored with its previous contents, whhch had been saved via getscreen$.

Start this program in a terminal.

Related: putscreen$