• JavaScript Command Shell

    From Matt@VERT to All on Fri Dec 19 21:25:44 2008
    I'm a bit confused. I am trying to write a JavaScript command shell for my board. I added the command shell to the configuration and set the internal code. When I login to try and use it, it says that it cannot find mframe.bin. Well, duh, because its JavaScript.

    How do I let the configuration that it is a javascript and not a baja module. Or, do I have to make a baja module that executes a javascript?

    Thanks!

    - Matt

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Matt on Fri Dec 19 21:33:09 2008
    Re: JavaScript Command Shell
    By: Matt to All on Fri Dec 19 2008 09:25 pm

    I'm a bit confused. I am trying to write a JavaScript command shell for my board. I added the command shell to the configuration and set the internal code. When I login to try and use it, it says that it cannot find mframe.bin. Well, duh, because its JavaScript.

    How do I let the configuration that it is a javascript and not a baja module. Or, do I have to make a baja module that executes a javascript?

    Exactly. You need a one line Baja module that executes the JavaScript. See exec/lbshell.src for an example.

    I plan to address this in a future version.

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #68:
    The longest one syllabled word is "screeched".
    Norco, CA WX: ---øF, ---% humidity, NaN mph --- wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Matt@VERT to Digital Man on Fri Dec 19 21:43:50 2008
    Re: JavaScript Command Shell
    By: Digital Man to Matt on Fri Dec 19 2008 09:33 pm

    Thanks Digital Man! What a quick reply too!




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tracker1@VERT/TRN to Matt on Fri Dec 19 23:06:08 2008
    On 12/19/2008 10:25 PM, Matt wrote:
    I'm a bit confused. I am trying to write a JavaScript command shell for my board. I added the command shell to the configuration and set the internal code. When I login to try and use it, it says that it cannot find mframe.bin. Well, duh, because its JavaScript.

    How do I let the configuration that it is a javascript and not a baja module. Or, do I have to make a baja module that executes a javascript?

    make a baja that executes the .js
    example....

    :top
    EXEC "?s3.js"
    # should only see in a shell change
    PAUSE
    GOTO top


    replace s3 with your shell... the loop is so you can break out of the js, and reload... this also works for changing shells... your js shell will need to detect the shell changed and exit the js.

    --
    Michael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.net icq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)

    ... FRA #008: Small print leads to large risk.

    ---
    þ Synchronet þ theroughnecks.net - you know you want it
  • From Reverend Shaft@VERT/ARENA to All on Sat Oct 22 11:13:28 2011
    Re: Re: JavaScript Command Sh
    By: Tracker1 to Matt on Fri Dec 19 2008 11:06 pm

    On 12/19/2008 10:25 PM, Matt wrote:
    How do I let the configuration that it is a javascript and not a baja modu Or, do I have to make a baja module that executes a javascript?

    make a baja that executes the .js example....

    :top EXEC "?s3.js" # should only see in a shell change PAUSE GOTO
    top

    replace s3 with your shell... the loop is so you can break out of the js, a reload... this also works for changing shells... your js shell will need to detect the shell changed and exit the js.

    I know this is an ancient thread, but it might be worth mentioning somewhere
    in the documentation. I spent a lot of time tracking this down last night,
    and then a lot of wasted time trying to figure out why once I changed to my custom shell, I couldn't change out of it without re-logging (because I's an idiot at 3am).

    The snippet I used to detect the shell change (to break out of the shell and allow another one to take over) was this:

    if(user.command_shell.toUpperCase() != "MYSHELL") {
    exit();
    }

    Is this the cleanest way to handle it?

    Reverend Shaft
    The Arena BBS
    telnet:\\arena.ourhobby.com


    ---
    þ Synchronet þ The Arena BBS | Bryan, OH | telnet:arena.ourhobby.com
  • From Digital Man@VERT to Reverend Shaft on Sun Oct 23 01:01:35 2011
    Re: Re: JavaScript Command Shell
    By: Reverend Shaft to All on Sat Oct 22 2011 11:13 am

    Re: Re: JavaScript Command Sh
    By: Tracker1 to Matt on Fri Dec 19 2008 11:06 pm

    On 12/19/2008 10:25 PM, Matt wrote:
    How do I let the configuration that it is a javascript and not a baja modu Or, do I have to make a baja module that executes a javascript?

    make a baja that executes the .js example....

    :top EXEC "?s3.js" # should only see in a shell change PAUSE GOTO
    top

    replace s3 with your shell... the loop is so you can break out of the js, a reload... this also works for changing shells... your js shell
    will need to detect the shell changed and exit the js.

    I know this is an ancient thread, but it might be worth mentioning
    somewhere in the documentation. I spent a lot of time tracking this down last night, and then a lot of wasted time trying to figure out why once I changed to my custom shell, I couldn't change out of it without re-logging (because I's an idiot at 3am).

    The snippet I used to detect the shell change (to break out of the shell
    and allow another one to take over) was this:

    if(user.command_shell.toUpperCase() != "MYSHELL") {
    exit();
    }

    Is this the cleanest way to handle it?

    That's pretty much how Deuce's lightbar/drop-down shell does it (lbshell.js). Take a look-see.

    digital man

    Synchronet "Real Fact" #0:
    Development began in 1990 of the (unnamed at the time) Synchronet BBS software.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net