I just started messing around with JS, so this might be really simple, but I'm just not getting it.
I'm running a test.js as an external Logon event.
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('attributes','set', ansi.BROWN);
console.print("testing");
The text prints in SyncTerm as yellow instead of brown.
So then I tried this:
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('ext_mode', 'set', 'no_bright_intensity');
Re: AnsiTerm.Js
By: Uatu13 to All on Sat Jul 07 2018 10:18 pm
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('ext_mode', 'set', 'no_bright_intensity');
Yeah, you probably don't want to do that. 1. It would only work in CTerm/SyncTERM termiantes and 2. it's going to disable high-intensity attributes for the entire session. :-)
digital man
Re: AnsiTerm.Js
By: Uatu13 to All on Sat Jul 07 2018 10:18 pm
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('ext_mode', 'set', 'no_bright_intensity');
Yeah, you probably don't want to do that. 1. It would only work in CTerm/SyncTERM termiantes and 2. it's going to disable high-intensity attributes for the entire session. :-)
digital man
Re: AnsiTerm.Js
By: Digital Man to Uatu13 on Sun Jul 08 2018 15:16:44
Re: AnsiTerm.Js
By: Uatu13 to All on Sat Jul 07 2018 10:18 pm
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('ext_mode', 'set', 'no_bright_intensity');
Yeah, you probably don't want to do that. 1. It would only work in CTerm/SyncTERM termiantes and 2. it's going to disable high-intensity attributes for the entire session. :-)
Thanks for the info. In what scenario would you use those commands / ansiterm_lib.js?
Also, I noticed an ANSI.JS file in xtrn/druglord/ that might be useful for text color without using @-Codes. Any thoughts on that?
var ansi = load({}, 'ansiterm_lib.js');
ansi.send('ext_mode', 'set', 'no_bright_intensity');
Thanks for the info. In what scenario would you use those commands /
ansiterm_lib.js?
If you want to do custom palletes are advanced ANSI-BBS 2.0 type stuff (e.g. enable ICE-colors).
I don't know why that would be easier. Ctrl-A codes automatically expand based on the user's terminal capabilities (not all terminals support ANSI sequences).
I don't know why that would be easier. Ctrl-A codes automatically
expand based on the user's terminal capabilities (not all terminals
support ANSI sequences).
I feel silly now. I was thinking the opposite; that terminals would be more compatible with ANSI than BBS Codes.. but clearly I need to read up on this more. lol
I feel silly now. I was thinking the opposite; that terminals would be more compatible with ANSI than BBS Codes.. but clearly I need to read up on this more. lol
Thanks for the help.
Re: AnsiTerm.Js
By: Uatu13 to Digital Man on Tue Jul 10 2018 07:30 pm
I don't know why that would be easier. Ctrl-A codes automatically
expand based on the user's terminal capabilities (not all terminals
support ANSI sequences).
I feel silly now. I was thinking the opposite; that terminals would
be more compatible with ANSI than BBS Codes.. but clearly I need to
read up on this more. lol
That's actually true, terminals are more compatible with ANSI than BBS codes. Synchronet automatically translates the Ctrl-A codes to ANSI if the terminal supports ANSI. And if the terminal doesn't support ANSI, then Synchronet does not include any color codes for the terminal client. The terminal isn't actually displaying the Ctrl-A codes.
Nightfox
Oh I see now, DM was saying Synchronet expands the Ctrl-A codes, not the terminal. Thanks for expaning on this Nightfox! lol
I still need to brush up on this stuff. So is it best to use the .asc files for menus etc. instead of .ans files?
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 579 |
Nodes: | 8 (0 / 8) |
Uptime: | 00:30:21 |
Calls: | 10,740 |
Files: | 5 |
Messages: | 444,491 |