Precisely Speaking
May 21, 2012, 07:20:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Set color property before CRT's  (Read 918 times)
slestak
Uber-Pro
****
Posts: 69



« on: April 19, 2011, 02:58:26 PM »

I have an extract that is primarily Unibasic.  I have soem status information I would like to print to the screen with simple CRT's.

The question I have is SB+ CUI colors are influencing the output.  My Screen Header color is being used as the background color for all printed text.

Here is a screenshot of what I an talking about.

Can I do a SB.PROCESS("REFRESH 7") or something like that to prevent the green background?
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #1 on: April 19, 2011, 04:28:11 PM »

I suppose you could try just a normal BASIC clear screen:

CRT @(-1):

Or maybe:

CALL SB.PROCESS('R,0')

??
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #2 on: April 20, 2011, 06:04:41 AM »

I did already have a CRT @(-1).  That was my first thought.  The second nugget in your post may get it.
Logged
slestak
Uber-Pro
****
Posts: 69



« Reply #3 on: April 20, 2011, 06:42:17 AM »

Lol.

The CALL SB.PROCESS('R,0') changed the output (for the better) but still colored.

It went from Green and Cyan to Blue and White.

At least it is more readable.  Grin

http://screencast.com/t/DsTylvhuWmqh
Logged
Colin Alfke
Professional
***
Posts: 22


« Reply #4 on: April 20, 2011, 07:11:59 AM »

I've noticed the same thing on any "utility" program I have that calls SB.DISP. Modes 1 and 2 seem OK but the others tend to confuse the output colours for anything sent with CRT afterwards. Not sure of the best way to "reset" the display parameters.

HTH
Colin Alfke
Calgary, Canada
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #5 on: April 20, 2011, 07:34:46 AM »

You might try this in place of the @(-1):

CRT TERM.DEFN<22,1> : TERM.DEFN<21,16> : @(-1) :

Assuming you have SB+ common, TERM.DEFN<23,1> should be "black background" and TERM.DEFN<22,16> should be "white foreground".  Now, I'm not sure how it'll display exactly (depending on the terminal definition you're using) but it's worth the attempt.

edit: Had the attribute #'s wrong.  Dang.
-K
« Last Edit: April 20, 2011, 08:48:11 AM by precisonline » Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
Colin Alfke
Professional
***
Posts: 22


« Reply #6 on: April 20, 2011, 08:15:00 AM »

Close. Doing a CRT TERM.DEFN<14,1> resets the colours back to the defined background for the terminal type. It's what I was looking for - but I'm not sure if it will solve the original problem. He may need to check appendix "J" of the SB+ reference manual on refreshing screen output....

hth
Colin Alfke
Calgary, Canada
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #7 on: April 20, 2011, 08:48:57 AM »

Yeah, I just realized I had the attribute numbers wrong anyway.  Thanks for the tip on <14>; I hadn't even thought of that one!
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #8 on: April 20, 2011, 10:06:27 AM »

That solved it, however, I had to use slightly different attributes.  When I looked at my term.defn in AE, the values I wanted were in 22,1 and 21,16.
Logged
slestak
Uber-Pro
****
Posts: 69



« Reply #9 on: April 20, 2011, 10:12:05 AM »

Doing a CRT TERM.DEFN<14,1> resets the colours back to the defined background for the terminal type.

This is good.  Better than me choosing the colors.  Works across other ppls term defns as well.
Logged
Colin Alfke
Professional
***
Posts: 22


« Reply #10 on: April 20, 2011, 08:37:08 PM »

That's what I thought.

P.S. I liked the old picture better!!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!