How to determine the "current" colour
Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Green Screen
Forum Description: General terminal emulation questions
URL: https://forum.asent.com/forum_posts.asp?TID=2412
Printed Date: March 26 2026 at 8:51pm Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com
Topic: How to determine the "current" colour
Posted By: Shrek59
Subject: How to determine the "current" colour
Date Posted: April 07 2014 at 2:26pm
Hi Pete,
Is there some way to retrieve the current colour being used to display text in Accuterm?
For example:
* the "normal" colour is set to white text on a turquoise background with InitSession.Colors(0) = 63
* the "current" colour is set to white text on a blue background with ESC:STX:"A15":CR:ESC:STX:"B3":CR
If I query the InitSession.color property, it returns 63. The documentation notes that this property returns the colour used by the SetText method - and when I call that method, that is indeed the colour that is used.
Is there any property I can query to return the colour currently being used by normal text at the cursor position - which should be 159 in the above example?
We are using Viewpoint A2 Enhanced emulation.
Thanks,
Brian
|
Replies:
Posted By: PSchellenbach
Date Posted: April 16 2014 at 3:12am
Hi Brian -
I cannot see any easy way to determine the current color used to display text. Might there be another way to solve the problem you are working on?
Thanks,
Pete
|
Posted By: Shrek59
Date Posted: April 16 2014 at 1:12pm
Thanks, Pete.
I was looking for a way for generic subroutine to determine what colour was being used. It is no great problem - I either pass colours as necessary, or blunder on in the expectation that "normal" conditions persist! <g>
Cheers,
Brian
|
|