Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 09 OCT 1998 05:29:15PM Terry Rainville wrote:

Here is the problem.

I can change the color of an object on a window using the following

code.

PRINT @(X,Y) 'ESC CHAR C CARROT<|'

this is a little hard to understand (Sorry) can not show characters

properly in this message but basicly it is as follows;

esc char (027) - esc sequence

C (067] - color code

carrot character - triangle (127) - background color

< sign 060 - forground color

What i want to do is basicly change the color of a character

within a variable in a program so when displayed in the data

prompt that portion of the data will be a different color than the

rest of the data which will be the default color for the prompt.

This is what ive tried

OtherVar=This Is A Test'

MyVar=ESCCCARROT<|' : OtherVar

The desired resault is - |This Is A Test

were | is a different color

I Get - ESCCCARROT<|This Is A Test with no color change

Dooooooooooooooooo

Any Help Please!!!!


At 11 OCT 1998 12:31AM Jonathan Bird wrote:

Does this help?

COLOUR =ESC$:'C17'

COLOUR =esc.to.attr(COLOUR)

OPTION =Some stuff'

POS =2

HIGHLIGHT =ESC$ : 'C1L'

HIGHLIGHT_ATTR =esc.to.attr(HIGHLIGHT)

OPT =OPTION1,POS -1

OPT := HIGHLIGHT

OPT := OPTIONPOS,1

OPT := COLOUR

OPT := OPTIONPOS + 1,len(OPTION) - POS

print COLOUR : oconv(OPT,'L#':CONV + 5) :


At 11 OCT 1998 08:13PM Claude Mansutti wrote:

Jonathan,

Have you tried changing colours (sucessfully) for specific variables

in AMVs on a Window?

I've spent plenty of time with some wierd results depending on the

length of the field.

Claude


At 12 OCT 1998 12:24AM Jonathan Bird wrote:

]]Have you tried changing colours (sucessfully) for specific variables

in AMVs on a Window?«

Yes, I've tried…. and tried,,,,, and tried. But with little consitant results. Eventually I gave up.

JB


At 13 OCT 1998 01:51PM Terry Rainville wrote:


At 13 OCT 1998 02:06PM Terry Rainville wrote:

Thanks for the help Jonathan. The routine works very well,

I did not know that function existed.

Unfortunatly we are still missing one very important aspect,

and that is how to get the changed variable with colors

into a window prompt WITHOUT IT SHOWING ESC CHARACTERS.

i have tried

wc_is%= Var

wc_display_action%=redisplay.prompts$

using the PRINT command in your example puts the output on the

window but not in the data prompt. Can not use @(X,Y) becuase

we do not know what position on the screen output will be displayed

in. Also just realized this is a AMV window, So Maybe this can not

even be done according to what you guys were saying.

Also in your example what is CONV - the compuiter did not like

this part so i had to remove it.

I changed that line to

print Colour : Opt :

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/3acc357cfcbd224b852566980076092f.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1