• AnsiTerm.Js

    From Uatu13@VERT/DARKSIDE to All on Sat Jul 7 22:18:49 2018
    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'); ãansi.send('attributes','set', ansi.BROWN);ãconsole.print("testing"); ããThe text shows up as brown, but then every .ans file on the BBS that shouldãhave yellow in it shows as brown.ããI hope this makes sense. I'm guessing that I need to somehow reset theãattributes or something after my code runs.ããAside from that, is there a better way to print colored text? Seems like a lotãof code and what if I wanted different colored words in the same printãstatement?ããThanks.ãã-=U13=-ãã---ã þ Synchronet þ The DarkSide of the Moon - telnet://darkside.synchro.netã
  • From Digital Man@VERT to Uatu13 on Sun Jul 8 15:16:44 2018
    Re: AnsiTerm.Jsã By: Uatu13 to All on Sat Jul 07 2018 10:18 pmãã > 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.ããHigh intensity brown is yellow - this is just how IBM-CGA worked.ããAnyway, the easiest way to change attributes is with color/attribute codes weãcall "Ctrl-A codes" (http://wiki.synchro.net/custom:ctrl-a_codes), like so inãJS:ãprint("\1nThis is normal. \1rThis is red. \1hThis is bright-red.");ãã > So then I tried this:ã >ã > 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ããSynchronet "Real Fact" #24:ã1584 Synchronet BBS Software registrations were sold between 1992 and 1996.ãNorco, CA WX: 98.3øF, 22.0% humidity, 10 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Uatu13@VERT/DARKSIDE to Digital Man on Mon Jul 9 00:30:09 2018
    Re: AnsiTerm.Jsã By: Digital Man to Uatu13 on Sun Jul 08 2018 15:16:44ãã DM> Re: AnsiTerm.Jsã DM> 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');ãã DM> Yeah, you probably don't want to do that. 1. It would only work inã DM> CTerm/SyncTERM termiantes and 2. it's going to disable high-intensityã DM> attributes for the entire session. :-)ãã DM> digital manãã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?ãã-=U13=-ãã---ã þ Synchronet þ The DarkSide of the Moon - telnet://darkside.synchro.netã
  • From Uatu13@VERT/DARKSIDE to Digital Man on Mon Jul 9 00:37:47 2018
    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. :-)

    digital man

    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 ctrl-a Codes. Any thoughts on that?

    -=U13=-ãã---ã þ Synchronet þ The DarkSide of the Moon - telnet://darkside.synchro.netã
  • From Digital Man@VERT to Uatu13 on Tue Jul 10 00:14:42 2018
    Re: AnsiTerm.Jsã By: Uatu13 to Digital Man on Mon Jul 09 2018 12:30 amãã > Re: AnsiTerm.Jsã > By: Digital Man to Uatu13 on Sun Jul 08 2018 15:16:44ã >ã > DM> Re: AnsiTerm.Jsã > DM> 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');ã >ã > DM> Yeah, you probably don't want to do that. 1. It would only work inã > DM> CTerm/SyncTERM termiantes and 2. it's going to disable high-intensityã > DM> attributes for the entire session. :-)ãã > 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).ãã > Also, I noticed an ANSI.JS file in xtrn/druglord/ that might be useful forã > text color without using @-Codes. Any thoughts on that?ãã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).ãã digital manããThis Is Spinal Tap quote #26:ãDavid St. Hubbins: They were still booing him when we came on stage.ãNorco, CA WX: 75.4øF, 62.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Uatu13@VERT/DARKSIDE to Digital Man on Tue Jul 10 19:30:17 2018
    Re: AnsiTerm.Jsã By: Digital Man to Uatu13 on Tue Jul 10 2018 00:14:42ããã > >>> 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?ãã DM> If you want to do custom palletes are advanced ANSI-BBS 2.0 type stuffã DM> (e.g. enable ICE-colors).ããOh, cool, I might have to look into that some day..ãã DM> I don't know why that would be easier. Ctrl-A codes automatically expandã DM> based on the user's terminal capabilities (not all terminals support ANSIã DM> 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ããThanks for the help.ãã-=U13=-ãã---ã þ Synchronet þ The DarkSide of the Moon - telnet://darkside.synchro.netã
  • From Nightfox@VERT/DIGDIST to Uatu13 on Wed Jul 11 09:41:37 2018
    Re: AnsiTerm.Jsã By: Uatu13 to Digital Man on Tue Jul 10 2018 07:30 pmãã DM>> I don't know why that would be easier. Ctrl-A codes automaticallyã DM>> expand based on the user's terminal capabilities (not all terminalsã DM>> support ANSI sequences). ãã Ua> I feel silly now. I was thinking the opposite; that terminals would beã Ua> more compatible with ANSI than BBS Codes.. but clearly I need to read upã Ua> 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ãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
  • From MRO@VERT/BBSESINF to Uatu13 on Wed Jul 11 15:53:20 2018
    Re: AnsiTerm.Jsã By: Uatu13 to Digital Man on Tue Jul 10 2018 07:30 pmããã > 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.ãããThe terminal doesnt know bbs codes.ã---ã þ Synchronet þ ::: BBSES.info - free BBS services :::ã
  • From Uatu13@VERT/DARKSIDE to Nightfox on Wed Jul 11 19:49:17 2018
    Re: AnsiTerm.Jsã By: Nightfox to Uatu13 on Wed Jul 11 2018 09:41:37ãã Ni> Re: AnsiTerm.Jsã Ni> By: Uatu13 to Digital Man on Tue Jul 10 2018 07:30 pmãã DM>>> I don't know why that would be easier. Ctrl-A codes automaticallyã DM>>> expand based on the user's terminal capabilities (not all terminalsã DM>>> support ANSI sequences). ãã Ua>> I feel silly now. I was thinking the opposite; that terminals wouldã Ua>> be more compatible with ANSI than BBS Codes.. but clearly I need toã Ua>> read up on this more. lolãã Ni> That's actually true, terminals are more compatible with ANSI than BBSã Ni> codes. Synchronet automatically translates the Ctrl-A codes to ANSI if theã Ni> terminal supports ANSI. And if the terminal doesn't support ANSI, thenã Ni> Synchronet does not include any color codes for the terminal client. Theã Ni> terminal isn't actually displaying the Ctrl-A codes.ãã Ni> 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?ãã-=U13=-ãã---ã þ Synchronet þ The DarkSide of the Moon - telnet://darkside.synchro.netã
  • From Nightfox@VERT/DIGDIST to Uatu13 on Thu Jul 12 09:16:07 2018
    Re: AnsiTerm.Jsã By: Uatu13 to Nightfox on Wed Jul 11 2018 07:49 pmãã Ua> Oh I see now, DM was saying Synchronet expands the Ctrl-A codes, not theã Ua> terminal. Thanks for expaning on this Nightfox! lolãã Ua> I still need to brush up on this stuff. So is it best to use the .ascã Ua> files for menus etc. instead of .ans files?ããI like to keep just .asc files, but whether or not you want to do that is up toãyou. You can sill keep separate .ans files for ANSI and .asc files that don'tãhave any color coding, if you want to do it that way.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã