home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION SCRNATTR (top, left, bottom, right, new_attr)
- *****************************************************************
-
- * Get or Set screen color attribute at specified coordinates
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- LOCAL counter, new_screen, old_attr, old_screen, scrn_len
-
- new_screen = ''
- old_screen = SAVESCREEN(top, left, bottom, right)
- old_attr = SUBSTR(old_screen, 2, 1)
- scrn_len = LEN(old_screen)
-
-
- IF VALTYPE(new_attr) = 'N'
- * If new attribute was passed, restore screen using it
- FOR counter = 1 TO scrn_len STEP 2
- new_screen = new_screen + SUBSTR(old_screen, counter, 1) ;
- + CHR(new_attr)
- NEXT
- RESTSCREEN(top, left, bottom, right, new_screen)
-
- ENDIF
-
- * Return original numeric attribute
- RETURN ASC(old_attr)
-
-
-