Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Flashing Background===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Sprezzatura Ltd|01 APR 1990|1.16+|EXPERT|BACKGROUND, VIDEO.RW, ESC.TO.ATTR, ATTR.TO.ESC, BITOR| Users of VIDEO.RW will be aware that the colour attributes for each byte of information on screen are stored in a single character, yet generally colour escape sequences are four characters long. The conversion between these formats is facilitated by the AREV functions ESC.TO.ATTR and ATTR.TO.ESC. Thus to get the screen attribute for Yellow on Blue (Esc C1N) one would simply say ATTR = ESC.TO.ATTR(CHAR(27) : "C1N"). Converting from attribute to escape conversely uses the ATTR.TO.ESC. The highest bit of the colour attribute determines whether or not the colour has a flashing background. If the highest bit is set the background will flash. If not the background will remain normal. To set the highest bit it is necessary to BITOR the attribute with 128. Try running the following with a (B option <code> DECLARE FUNCTION ATTR.TO.ESC, ESC.TO.ATTR X = ESC.TO.ATTR(@AW<4>) X = BITOR(SEQ(X),128) X = ATTR.TO.ESC(CHAR(X)) PRINT @AW<4> : "Hello" PRINT X : "Hello" INPUT X,1 </code> (Volume 1, Issue 10, Page 9) tips/revmedia/v1i10a7.txt Last modified: 2024/06/19 20:20by 127.0.0.1