View unanswered posts | View active topics It is currently Mon Feb 24, 2020 9:23 am



Reply to topic  [ 1 post ] 
 TWX Proxy - New Commands addQuickText and clearQuickText 
Author Message
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2345
Location: Oklahoma City, OK 73170 US
Unread post TWX Proxy - New Commands addQuickText and clearQuickText
Remember my recent rant about TWX Colors:
Subject: Stupid question of the day?

It included this chart showing TWX codes out of order:

Code:
| Color |  ANSI |  TWX   | TW2002 |
|Black  | ^[30m | ANSI_0 |   ~a   |
|Red    | ^[31m | ANSI_4 |   ~b   |
|Green  | ^[32m | ANSI_2 |   ~c   |
|Yellow | ^[33m | ANSI_6 |   ~d   |
|Blue   | ^[34m | ANSI_1 |   ~e   |
|Magenta| ^[35m | ANSI_5 |   ~f   |
|Cyan   | ^[36m | ANSI_3 |   ~g   |
|White  | ^[37m | ANSI_7 |   ~h   |


This is a partial list, there are actually over 40 codes. The column on the far right is the internal color codes used by TW2002. You can see them in MENUFILE.TXT, which holds the help menu screens, and they are used internally as a shorthand for ANSI color codes in prompts and other screens.

In another post you may have noticed TWX color codes are RED:

Image

They are RED because they should be considered depreciated (Along with setVar). TWX 2.06.05+ will support TW2002 color codes, which are in ANSI order "krgybmcw" and capital letters are the bright versions of the same color. For bright white ANSI_15 is replaced with ~H and you can include the code in the string.

So the above snippet becomes:

Image

Not that much of a difference, but each color code is 10 characters the old way and only 2 characters the new way, so you probably didn't even notice I made the dashes yellow and the string is still shorted than the original. You can also use actual ANSI codes (i.e. "^[3A' - cursor up 3 lines), which are actually still shorter than TWX color codes. This is so much easier to use I may actually consider writing a TWX script.

But wait, there is more!!!

The new commands addQuickText and clearQuickText let you create your own color codes!

Image

User color codes are applied first, so they override built-in color codes, so you can even change existing colors.

See the TWX WIKI for more information:
https://github.com/MicroBlaster/TWXProx ... dQuickText

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
TeamSpeak3: ts.microblaster.net:9987

Do not try and bend the spoon. That’s impossible.
Instead… only try to realize there is no spoon.


Fri Jan 03, 2020 11:12 pm
Profile ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.