ColorWin() - replaces colours and characters for a specific area Replaces particular attributes in a screen area ──────────────────────────────────────────────────────────────────────────────
<nTop> is the top row to start the replacement on. The default is the cursor line.
<nLeft> is the left column to start the replacement on. The default is the cursor column.
<nBottom> is the bottom row to end the replacement on. The default is the last row in the active window.
<nRight> is the right column to end the replacement on. The default is the last column in the active window.
<cNewAttr | nNewAttr> is the new colour string to use to replace the old attribute with. The default is the current value of CLEARA.
<cOldAttr | nOldAttr> is the old colour string to replace. The default is all colour strings.
Returns
ColorWin() always returns a "".
Description
ColorWin() is used to replace all occurrences of <cOldAttr | nOldAttr> with <cNewAttr | nNewAttr>. This differs from ColorRepl() in that ColorWin() allows you to define the area of the active window to work with.
Notes
■ This function does not alter the cursor position.
Examples
■ Replace all occurrences of white on black (7) for Red on White (116) from the cursor position for the rest of the active window
ColorWin(,,,, 0, 116)
■ Replace all colour strings in the active window of white on black (7) for Red on White (116)