Changing foreground / background colors in WRQ Reflection from connected host programmatically.
Sample perl source: also see /usr/local/bin/*.pl
#!/usr/bin/perl -w
# /usr/local/bin/prodcolors.pl
# Changes colors of foreground/background to: black/white respectively
use warnings;
use strict;
my $code="\e&o2GSub Main
With Application
.SetColorMap rcPlainAttribute, rcBlack, rcWhite
End With
End Sub\e&oH";
print "$code";
<ESC>&o2G Sub Main
Dim c As Integer
c = Val(InputBox$("Enter the sales amount:"))
MsgBox "Your commission is: " & c
End Sub<ESC>&oH
Reflection Basic:
Syntax: object.SetColorMap Attribute, Foreground, Background
.SetColorMap rcInverseAttribute+rcBlinkAttribute, rcGrey, rcBlue
or
.SetColorMap rcPlainAttribute, rcGrey, rcBlue
Attributes:
rcPlainAttribute
rcBlinkAttribute
rcInverseAttribute
rcUnderlineAttribute
rcBoldAttribute (for UNIX and Digital hosts)
rcHalfbrightAttribute (for HP hosts)
rcFunctionKeys (for HP hosts)
rcHotspotAttribute
rcCursorAttribute
Colors:
rcWhite
rcGrey
rcRed
rcBlue
rcGreen
rcYellow
rcCyan
rcMagenta
rcBlack
rcDkGrey
rcDkRed
rcDkBlue
rcDkGreen
rcDkYellow
rcDkCyan
rcDkMagenta
To open/add Reflection Basic macros menu:
Under the Setup menu, click Menu. Then add the Script menu from the "Additional Items/Items from version 6.x" tree to the current menu.
Reflection tech references:
How to Send Reflection Commands from the Host
http://support.wrq.com/techdocs/1223.html
Index of Reflection Scripting Technical Notes
http://support.wrq.com/techdocs/9993.html
Other very good references are the manuals/help files in:
C:\Program Files\Reflection\Manuals and C:\Program Files\Reflection\Help\Enu
rbrwin.hlp - Reflection Basic (scripting) Help
No comments:
Post a Comment