• JS: Exec, Load or DIE!

    From Mindless Automaton@VERT/ELDRITCH to DOVE-Net.Programming_(Jav on Mon Jun 6 20:43:00 2005
    All:

    I've been doing some fiddlin' with js menus and was wondering if someone
    could give me the correct syntax to call another js.

    Ie.

    I have default.js which has most of the menu options in it, but it was
    getting rather large, so I created an additional js for external programs
    and such (xtrn.js).

    I've tried a few things, but I seem to fail.

    Thanks,

    Mindless Automaton
    ---
    þ Synchronet
  • From Digital Man@VERT to Mindless Automaton on Mon Jun 6 21:42:35 2005
    Re: JS: Exec, Load or DIE!
    By: Mindless Automaton to DOVE-Net.Programming_(Jav on Mon Jun 06 2005 01:43 pm

    All:

    I've been doing some fiddlin' with js menus and was wondering if someone could give me the correct syntax to call another js.

    Ie.

    I have default.js which has most of the menu options in it, but it was getting rather large, so I created an additional js for external programs and such (xtrn.js).

    I've tried a few things, but I seem to fail.

    See the load() function in: http://synchro.net/docs/jsobjs.html#global_methods

    digital man

    Snapple "Real Fact" #126:
    A pigeon's feathers are heavier than its bones.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Grymmjack@VERT to Mindless Automaton on Wed Jun 8 15:29:06 2005

    I've been doing some fiddlin' with js menus and was wondering if someone could give me the correct syntax to call another js.

    Ie.

    I have default.js which has most of the menu options in it, but it was getting rather large, so I created an additional js for external programs and such (xtrn.js).

    i believe what you are looking for is include? i think there is an include function/feature/whatever.


    - grymmjack<grymmz0r@yahoo.com>


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tracker1@VERT/TRN to Mindless Automaton on Mon Jun 20 14:44:00 2005
    Mindless Automaton wrote:
    I've been doing some fiddlin' with js menus and was wondering if someone could give me the correct syntax to call another js.

    Ie.

    I have default.js which has most of the menu options in it, but it was getting rather large, so I created an additional js for external programs
    and such (xtrn.js).

    I've tried a few things, but I seem to fail.

    USE:
    load("xtrn.js");
    or
    bbs.exec("?xtrn.js");

    use the load if you can... it will give you less headaches in the end, trust me... if you need params, load("xtrn.js","param1","param2"...);

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

    ---
    þ Synchronet þ theroughnecks.net - you know you want it
  • From Mindless Automaton@VERT/ELDRITCH to Tracker1 on Thu Sep 15 02:08:00 2005
    Tracker1 wrote:
    I've tried a few things, but I seem to fail.


    USE:
    load("xtrn.js");
    or
    bbs.exec("?xtrn.js");

    use the load if you can... it will give you less headaches in the end, trust me... if you need params, load("xtrn.js","param1","param2"...);


    Alrighty, I changed the logon.js? (login, logon, I get the names confused) to have it run bullseye.js using load("bullseye.js") instead of the regular way bullseye.bin was set up to run. However, when I hit enter to continue from bullseye, I am get bullseye again and I can't escape!

    Therefore, there is probably a way to execute a js from the original file and return to the original file when that script is done that I haven't figured out.

    Right now I split the logon/login one in two so it loads log?n, loads bullseye,
    loads the other half, which is probably not the best way to go.

    If I switch back to loading bullseye as a logon event (set up through scfg) should the command line be ?bullseye.js or ?

    Also how/when do you know to use a ? or * in something like bbs.exec("?xtrn.js"); and why isn't it used in load("xtrn.js");?

    Many thanks,

    -Mindless Automaton
    ---
    þ Synchronet
  • From Melkor@VERT/STARFRON to Mindless Automaton on Thu Sep 15 05:22:00 2005

    If I switch back to loading bullseye as a logon event (set up through scfg) should the command line be ?bullseye.js or ?
    I changed mine in scfg to ?bullseye.js and it runs perfectly..


    ...First secure an independent income, then practice virtue.
    Join StarNet today.. Http://starfrontiers.dyndns.org


    ---
    þ Synchronet þ Star Frontiers Home of StarNet Telnet://starfrontiers.dyndns.org
  • From Digital Man@VERT to Mindless Automaton on Thu Sep 15 05:47:54 2005
    Re: Re: JS: Exec, Load or DIE
    By: Mindless Automaton to Tracker1 on Wed Sep 14 2005 07:08 pm

    Also how/when do you know to use a ? or * in something like bbs.exec("?xtrn.js"); and why isn't it used in load("xtrn.js");?

    bbs.exec() can be used to run all kinds of modules:
    * 16-bit DOS applications
    * 32-bit native applications
    * Baja modules
    * JavaScript modules

    '?' is used to indicate that the module being executed is a JavaScript module. '*' is used to indicate that the module being executed is a Baja (.bin) module.

    load() can only be used to execute other JavaScript modules, so no '?' is needed.

    digital man

    Snapple "Real Fact" #25:
    The only food that does not spoil is honey.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mindless Automaton@VERT/ELDRITCH to Melkor on Thu Sep 15 17:18:00 2005
    Melkor wrote:

    If I switch back to loading bullseye as a logon event (set up through scfg)
    should the command line be ?bullseye.js or ?
    I changed mine in scfg to ?bullseye.js and it runs perfectly..


    Alrighty, I'll probably go back and try that then.

    Thanks,

    Mindless Automaton
    ---
    þ Synchronet
  • From Mindless Automaton@VERT/ELDRITCH to Digital Man on Thu Sep 15 17:18:00 2005
    Digital Man wrote:
    Re: Re: JS: Exec, Load or DIE
    By: Mindless Automaton to Tracker1 on Wed Sep 14 2005 07:08 pm

    Also how/when do you know to use a ? or * in something like bbs.exec("?xtrn.js"); and why isn't it used in load("xtrn.js");?

    bbs.exec() can be used to run all kinds of modules:
    * 16-bit DOS applications
    * 32-bit native applications
    * Baja modules
    * JavaScript modules

    '?' is used to indicate that the module being executed is a JavaScript module.
    '*' is used to indicate that the module being executed is a Baja (.bin) module.

    load() can only be used to execute other JavaScript modules, so no '?' is needed.

    digital man

    Excellent. Thanks for the clarification.

    -Mindless Automaton
    ---
    þ Synchronet