• custom matrix login menu

    From Lesser Keys@VERT to All on Thu Oct 24 22:28:27 2013
    I am working on a custom logon matrix menu. I have a few questions. First question, Is there a way to load a picture into the script without it redrawing the menu every time someone presses an arrow key to move. I cant figure it out. It works ok I guess but the script must redraw the menu every time someone moves the light bar...And also I would like to put ansi around the enter user name and password part. I cant seem to get the ansi to fit around the text instead it covers the text or it is in the wrong place...
    thanks
    Solomon's Temple * telnet (wm.myftp.org)



    ---
    Synchronet Solomon's Temple *telnet://wm.myftp.org
  • From Nightfox@VERT to Lesser Keys on Fri Oct 25 20:30:36 2013
    Re: custom matrix login menu
    By: Lesser Keys to All on Thu Oct 24 2013 22:28:27

    I am working on a custom logon matrix menu. I have a few questions. First question, Is there a way to load a picture into the script without it redrawing the menu every time someone presses an arrow key to move. I cant figure it out. It works ok I guess but the script must redraw the menu every time someone moves the light bar...And also I would like to put ansi around the enter user name and password part. I cant seem to get the ansi to fit around the text instead it covers the text or it is in the wrong place... thanks

    Generally speaking (without seeing the specifics of your code), what you'd need to do is to display the ANSI, then display your lightbar menu and have it do basically an input loop and respond to arrow keys, etc. and only redraw the menu components.

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Lesser Keys@VERT to Nightfox on Sat Oct 26 04:22:04 2013
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Fri Oct 25 2013 08:30 pm

    need to do is to display the ANSI, then display your lightbar menu and have it do basically an input loop and respond to arrow keys, etc. and only redraw the menu components.
    how would I go about doing this lol?
    Solomon's Temple * telnet (wm.myftp.org)



    ---
    Synchronet Solomon's Temple *telnet://wm.myftp.org
  • From Nightfox@VERT to Lesser Keys on Sat Oct 26 08:47:07 2013
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Sat Oct 26 2013 04:22:04

    need to do is to display the ANSI, then display your lightbar menu
    and have it do basically an input loop and respond to arrow keys,
    etc. and only redraw the menu components.

    how would I go about doing this lol?

    Since you're asking this in the Synchronet Baja message area, I suppose you want a Baja solution - But unfortunately I don't have a solution in Baja to offer you. But if you want, you can take a look at my JavaScript login matrix as an example:
    ftp://www.digitaldistortionbbs.com/bbs/SYNC_JS/ddMat109.zip

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Lesser Keys@VERT to Nightfox on Sat Oct 26 16:06:01 2013
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Sat Oct 26 2013 08:47 am

    login matrix as an example: ftp://www.digitaldistortionbbs.com/bbs/SYNC_JS/ddMat109.zip
    Lol I am not good with javascript at all......
    Too much stuff to learn...not a lot of time....
    I have been running a system for 3 maybe 4 months...And I can't just jump into javascript full force, when I am trying to learn 900 other things! :(

    I wish js was easier. Some of you guys say it is...But I say it's 200 times more difficult. The syntax looks like something from another planet...I can look at baja all day and just know what the script is doing...I can't do that with javascript. I have looked at your logon matrix. It's way over my head. Solomon's Temple * telnet (wm.myftp.org)



    ---
    Synchronet Solomon's Temple *telnet://wm.myftp.org
  • From Nightfox@VERT to Lesser Keys on Sun Oct 27 00:24:41 2013
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Sat Oct 26 2013 16:06:01

    login matrix as an example:
    ftp://www.digitaldistortionbbs.com/bbs/SYNC_JS/ddMat109.zip

    Lol I am not good with javascript at all......
    Too much stuff to learn...not a lot of time....
    I have been running a system for 3 maybe 4 months...And I can't just jump into javascript full force, when I am trying to learn 900 other things! :(

    Well you were the one asking for help, and I've offered my matrix as an example.. Take it or leave it.

    I wish js was easier. Some of you guys say it is...But I say it's 200 times more difficult. The syntax looks like something from another planet...I can look at baja all day and just know what the script is doing...I can't do that with javascript.

    Interesting, I tend to feel the opposite, that JavaScript is easier to understand. But that may be because most of the programming languages I've used have similar syntax. Baja feels more like BASIC or assembly to me. I do have the feeling that you can do more in JavaScript with fewer lines of code.

    One advantage JavaScript has is that it's a lot more powerful. It seems that Synchronet is going further in the direction of using JavaScript as its primary scripting language.

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Lesser Keys@VERT to Nightfox on Sun Oct 27 18:04:22 2013
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Sun Oct 27 2013 12:24 am

    Well you were the one asking for help, and I've offered my matrix as an example.. Take it or leave it.
    I'm using it right now. I seen how how got the arrow keys to work with the lightbar! I guess my question would be how do you know were the text and light bar menu is going to show up on screen? Do you have to set a specific location for the lightbar menu to be on the screen?
    Interesting, I tend to feel the opposite, that JavaScript is easier to understand. But that may be because most of the programming languages I've used have similar syntax. Baja feels more like BASIC or assembly to me. I do have the feeling that you can do more in JavaScript with fewer lines of code.
    I agree somethings in js the code just looks more powerful to me. One line of code does several different things. I grew up as a kid using BASIc and assembly so baja looks easier to me. The scripts themselves look more familiar.. I do understand some of the things that java script can do, I am toying with js too! Maybe in a few months I will be coding js a little better than I am now. At least I am starting to understand some of scripting for synchronet. Back in the day when I tried to run a synchronet bbs. I just ripped a bunch of ansi art, not changing any of the scripts...That was a sad bbs!!! I thought it was cool....but got flamed big time for running it.
    thanks nightfox take care
    Solomon's Temple * telnet (wm.myftp.org)



    ---
    Synchronet Solomon's Temple *telnet://wm.myftp.org
  • From Nightfox@VERT to Lesser Keys on Sun Oct 27 19:40:16 2013
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Sun Oct 27 2013 18:04:22

    I'm using it right now. I seen how how got the arrow keys to work with the lightbar! I guess my question would be how do you know were the text and light bar menu is going to show up on screen? Do you have to set a specific location for the lightbar menu to be on the screen?

    Yes, the script knows where the menu is on the screen and it knows the menu's size, so with that information, it's able to know where to draw the menu items. And it knows the selected item, which is the one that is highlighted with the lightbar.

    I agree somethings in js the code just looks more powerful to me. One
    line of code does several different things. I grew up as a kid using
    BASIc and assembly so baja looks easier to me. The scripts themselves
    look more familiar..

    Yeah, languages that are similar to other languages you already know are definitely easier to learn. :)

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Lesser Keys@VERT to Nightfox on Sun Apr 5 15:00:40 2015
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Fri Oct 25 2013 08:30 pm

    I am working on a custom logon matrix menu. I have a few questions.
    First question, Is there a way to load a picture into the script
    without it redrawing the menu every time someone presses an arrow
    key to move. I cant figure it out. It works ok I guess but the
    script must redraw the menu every time someone moves the light
    bar...And also I would like to put ansi around the enter user name
    and password part. I cant seem to get the ansi to fit around the
    text instead it covers the text or it is in the wrong place...
    thanks
    Generally speaking (without seeing the specifics of your code), what you'd need to do is to display the ANSI, then display your lightbar menu and have it do basically an input loop and respond to arrow keys, etc. and only redraw the menu components.

    Okay, thanks! I have another question. It maybe stupid, or not make sence. How do I load the ansi, and embed the lightbar menu inside tha ansi.
    I guess I could execute the baja script for the light bar inside the ansi file. Using the following @EXEC:MODNAME@
    And for the curor inside tha ansi by
    @codes@
    UP Move cursor up one row (ANSI) 3.0b UP:n Move cursor up n rows (ANSI) 3.0b DOWN Move cursor down one row (ANSI) 3.0b DOWN:n Move cursor down n rows (ANSI) 3.0b RIGHT Move cursor right one column (ANSI) 3.0b RIGHT:n Move cursor right n columns (ANSI) 3.0b LEFT Move cursor left one column (ANSI) 3.0b LEFT:n Move cursor left n columns (ANSI) 3.0b GOTOXY:x,y Move cursor to x/y (1-based) (ANSI) 3.0b PUSHXY Save current cursor position (ANSI) 3.0b POPXY Restore saved cursor position (ANSI) 3.0b

    Inside the ANSI I am trying to display.
    I am thinking I would have to create a color to highlight the selected text. Also, setting a variable for each arrow key, or by using w,a,s,d. I have no idea how to set a variable for arrow keys..I am sifting through baja documentation for find this.
    I am guessing I need to find some lightbar *.src files for baja to as well. I can't seem to find any.

    Thanks for your time.

    Regards,


    ... A seeming ignorance is often a most necessary part of worldly knowledge. Solomon's Temple BBS
    Home to Starr-Net
    Telnet://solomonstemplebbs.com, https://solomonstemplebbs.com




    ---
    Synchronet Solomon's Temple telnet://solomonstemplebbs.com, Home to Starr-Net
  • From Lesser Keys@VERT to Nightfox on Sun Apr 5 15:02:51 2015
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Sun Oct 27 2013 07:40 pm

    I'm using it right now. I seen how how got the arrow keys to work
    with the lightbar! I guess my question would be how do you know were
    the text and light bar menu is going to show up on screen? Do you
    have to set a specific location for the lightbar menu to be on the
    screen?

    Yes, the script knows where the menu is on the screen and it knows the menu's size, so with that information, it's able to know where to draw the menu items. And it knows the selected item, which is the one that is highlighted with the lightbar.

    I agree somethings in js the code just looks more powerful to me.
    One line of code does several different things. I grew up as a kid
    using BASIc and assembly so baja looks easier to me. The scripts
    themselves look more familiar..

    Yeah, languages that are similar to other languages you already know are definitely easier to learn. :)


    My problem is Java Script is too complicated for my incompetant brain, to wrap my head around.

    ... Not tonight honey, ...I feel a modem coming on.
    Solomon's Temple BBS
    Home to Starr-Net
    Telnet://solomonstemplebbs.com, https://solomonstemplebbs.com




    ---
    Synchronet Solomon's Temple telnet://solomonstemplebbs.com, Home to Starr-Net
  • From Nightfox@VERT to Lesser Keys on Sun Apr 5 13:09:30 2015
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Sun Apr 05 2015 15:00:40

    Okay, thanks! I have another question. It maybe stupid, or not make sence. How do I load the ansi, and embed the lightbar menu inside tha ansi.
    I guess I could execute the baja script for the light bar inside the ansi file. Using the following @EXEC:MODNAME@
    And for the curor inside tha ansi by
    @codes@

    It might be simpler to have your script move the cursor around rather than using @-codes to do so. Your script can display the ANSI, then (if you're using JavaScript) can call the console.gotoxy() method to move the cursor, and then draw the menu.

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Lesser Keys on Mon Apr 6 16:55:36 2015
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Sun Apr 05 2015 03:00 pm

    idea how to set a variable for arrow keys..I am sifting through baja documentation for find this. I am guessing I need to find some lightbar *.src files for baja to as well. I can't seem to find any.

    There's an example Baja login matrix using lightbars in exec/matrix.src. It's a
    very simple example which doesn't use any external ANSI files or @-codes.

    digital man

    Synchronet "Real Fact" #43:
    Synchronet added JavaScript suppport with v3.10a (2001).
    Norco, CA WX: 61.8F, 35.0% humidity, 10 mph SSE wind, 0.00 inches rain/24hrs ---
    Synchronet Vertrauen Home of Synchronet telnet://vert.synchro.net
  • From Lesser Keys@VERT to Nightfox on Wed Apr 15 15:07:14 2015
    Re: custom matrix login menu
    By: Nightfox to Lesser Keys on Sun Apr 05 2015 01:09 pm

    It might be simpler to have your script move the cursor around rather
    than using @-codes to do so. Your script can display the ANSI, then (if you're using JavaScript) can call the console.gotoxy() method to move
    the cursor, and then draw the menu.

    Thanks! How do I set a command key for the arrow keys. For example if The user presses down one time, so that the highlighted text box moves down one space. Also, how does one set a command key for two spaces down?
    Sorry I am a newbie! :P

    ... Anything anybody can say about America is true.
    Solomon's Temple BBS
    Home to Starr-Net
    Telnet://solomonstemplebbs.com, https://solomonstemplebbs.com




    ---
    Synchronet Solomon's Temple telnet://solomonstemplebbs.com, Home to Starr-Net
  • From Nightfox@VERT to Lesser Keys on Wed Apr 15 18:17:31 2015
    Re: custom matrix login menu
    By: Lesser Keys to Nightfox on Wed Apr 15 2015 15:07:14

    Thanks! How do I set a command key for the arrow keys. For example if The user presses down one time, so that the highlighted text box moves down one space. Also, how does one set a command key for two spaces down?
    Sorry I am a newbie! :P

    Well I haven't actually done much Baja for Synchronet (I mainly write mods in JavaScript), so there may be someone else more knowledgeable on that than I am. But responding to a keypress in Baja is just a matter of using the cmdkey command. In JavaScript, the down arrow key is defined as '\x0a' - maybe the same can be used in Baja? I'm not sure. sbbsdefs.js (in sbbs\exec\load) has definitions (for JavaScript) for the arrow keys and others - Search for KEY_UP to find the section where the arrow keys are defined there.

    Also, the following is the Baja documentation, which should explain how to respond to keypresses and everything else Baja can do: http://www.synchro.net/docs/baja.html

    Nightfox

    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com