• Baja to JS conversion:

    From Digital Man@VERT to Corey on Mon Oct 26 14:23:00 2009
    /* Replace this Baja code:
    :doors
    cmd_home
    compare_user_misc UM_expert
    if_false
    menu 3stooges\doors
    end_if

    async
    ... with this JS code: */

    load("sbbsdefs.js");

    while(bbs.online) {
    if(!(user.settings & USER_EXPERT))
    bbs.menu("3stooges/doors");

    /* Replace this Baja code:

    # Display main Prompt
    print " Games "

    # Get key (with / extended commands allowed)
    compare_user_misc UM_COLDKEYS
    if_false
    getkeye
    else
    getstrupr 60
    endif

    ... with this JS code: */

    console.print(" Games ");
    var key=console.getkey(K_UPPER);

    /* Replace this Baja code:

    # Show the key hit
    printkey
    logkey

    ... this this JS code: */

    console.print(key + "\r\n");
    bbs.log_key(key);

    /* Replace this Baja code:

    cmdkey ?
    compare_user_misc UM_expert
    if_true
    menu doors
    end_if
    end_cmd

    cmdkey A
    exec_xtrn amb4
    end_cmd

    ... with this JS code: */

    switch(key) {
    case '?':
    if(user.settings & USER_EXPERT)
    bbs.menu("doors");
    break;
    case 'A':
    bbs.exec_xtrn("amb4");
    break;
    }
    }

    That should be enough to get you going...

    digital man

    Snapple "Real Fact" #82:
    August has the highest percentage of births.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Corey@VERT/TSGC to Digital Man on Mon Oct 26 17:01:00 2009
    Re: Baja to JS conversion:
    By: Digital Man to Corey on Mon Oct 26 2009 06:23 pm

    /* Replace this Baja code:
    :doors
    cmd_home
    compare_user_misc UM_expert
    if_false
    menu 3stooges\doors
    end_if

    async
    ... with this JS code: */

    load("sbbsdefs.js");

    while(bbs.online) {
    if(!(user.settings & USER_EXPERT))
    bbs.menu("3stooges/doors");

    /* Replace this Baja code:

    # Display main Prompt
    print " Games "

    # Get key (with / extended commands allowed)
    compare_user_misc UM_COLDKEYS
    if_false
    getkeye
    else
    getstrupr 60
    endif

    ... with this JS code: */

    console.print(" Games ");
    var key=console.getkey(K_UPPER);

    /* Replace this Baja code:

    # Show the key hit
    printkey
    logkey

    ... this this JS code: */

    console.print(key + "\r\n");
    bbs.log_key(key);

    /* Replace this Baja code:

    cmdkey ?
    compare_user_misc UM_expert
    if_true
    menu doors
    end_if
    end_cmd

    cmdkey A
    exec_xtrn amb4
    end_cmd

    ... with this JS code: */

    switch(key) {
    case '?':
    if(user.settings & USER_EXPERT)
    bbs.menu("doors");
    break;
    case 'A':
    bbs.exec_xtrn("amb4");
    break;
    }
    }

    That should be enough to get you going...

    digital man

    Snapple "Real Fact" #82:
    August has the highest percentage of births.


    no I mean in the classic_shell.js
    I want to Switch to all js scripts, instead of baja.

    Caput meum major podice meo.
    This message has ended, go in peace...

    ---
    þ Synchronet þ Three Stooges Gentlemens Club - Las Vegas, Nv
  • From Digital Man@VERT to Corey on Mon Oct 26 18:19:00 2009
    Re: Baja to JS conversion:
    By: Corey to Digital Man on Mon Oct 26 2009 09:01 pm

    Re: Baja to JS conversion:
    By: Digital Man to Corey on Mon Oct 26 2009 06:23 pm

    /* Replace this Baja code:
    :doors
    cmd_home
    compare_user_misc UM_expert
    if_false
    menu 3stooges\doors
    end_if

    async
    ... with this JS code: */

    load("sbbsdefs.js");

    while(bbs.online) {
    if(!(user.settings & USER_EXPERT))
    bbs.menu("3stooges/doors");

    /* Replace this Baja code:

    # Display main Prompt
    print " Games "

    # Get key (with / extended commands allowed)
    compare_user_misc UM_COLDKEYS
    if_false
    getkeye
    else
    getstrupr 60
    endif

    ... with this JS code: */

    console.print(" Games ");
    var key=console.getkey(K_UPPER);

    /* Replace this Baja code:

    # Show the key hit
    printkey
    logkey

    ... this this JS code: */

    console.print(key + "\r\n");
    bbs.log_key(key);

    /* Replace this Baja code:

    cmdkey ?
    compare_user_misc UM_expert
    if_true
    menu doors
    end_if
    end_cmd

    cmdkey A
    exec_xtrn amb4
    end_cmd

    ... with this JS code: */

    switch(key) {
    case '?':
    if(user.settings & USER_EXPERT)
    bbs.menu("doors");
    break;
    case 'A':
    bbs.exec_xtrn("amb4");
    break;
    }
    }

    That should be enough to get you going...

    no I mean in the classic_shell.js
    I want to Switch to all js scripts, instead of baja.

    And I provided you with the JS equivalents for your Baja code.

    The stock xtrn_sec module is in JS (exec/xtrn_sec.js), so I'm not really sure what you're asking for.

    digital man

    Snapple "Real Fact" #35:
    Elephants only sleep 2 hours a day.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MCMLXXIX@VERT/MDJ to Digital Man on Tue Oct 27 03:56:00 2009
    Re: Baja to JS conversion:
    By: Digital Man to Corey on Mon Oct 26 2009 22:19:15

    The stock xtrn_sec module is in JS (exec/xtrn_sec.js), so I'm not really sure what you're asking for.

    this reminds me of my beginnings here.

    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)