• Internal codes in Baja

    From Tegularius@BAUDHOUS to All on Thursday, July 02, 2009 19:33:28
    I would like to write a command to select a file area by means of a mnemonic code (instead of by number after scrolling through perhaps several pages of listings, as the default provides).

    The FILE_SET_AREA function works fine as long as the user knows the complete internal code of a file area and types it in. However, this ordinarily consists of the internal code of the library + that of the area within the library. I don't want to require the user to type anything but the code of
    the area, without the library prefix.

    So how can I get a hold of either the internal code (preferably) or at least the short name of the currently selected library in a Baja program?

    "@LIB@" displays the library's short name but I haven't seen a way to do anything with @-codes except display them.

    ---
    ■ Synchronet ■ The Bauding House - baudhous.synchro.net
  • From Digital Man to Tegularius on Friday, July 03, 2009 02:37:13
    Re: Internal codes in Baja
    By: Tegularius to All on Thu Jul 02 2009 07:33 pm

    I would like to write a command to select a file area by means of a
    mnemonic code (instead of by number after scrolling through perhaps several pages of listings, as the default provides).

    The FILE_SET_AREA function works fine as long as the user knows the
    complete internal code of a file area and types it in. However, this ordinarily consists of the internal code of the library + that of the area within the library. I don't want to require the user to type anything but the code of the area, without the library prefix.

    You can choose what you your internal codes to be. If don't want the library code prefix, just set it to blank in SCFG.

    So how can I get a hold of either the internal code (preferably) or at
    least the short name of the currently selected library in a Baja program?

    I can't think of a way in Baja off-hand. My suggestion would be to use JavaScript instead where it is most certainly possible.

    "@LIB@" displays the library's short name but I haven't seen a way to do anything with @-codes except display them.

    Yup. And that's only the *current* library's short name, not all of your library short names.

    digital man

    Snapple "Real Fact" #85:
    The Mona Lisa has no eyebrows.
  • From Jas Hud@jasonhDOVENET@eob-bbs.c0m to All on Saturday, July 04, 2009 06:03:30
    Tegularius wrote:
    I would like to write a command to select a file area by means of a mnemonic code (instead of by number after scrolling through perhaps several pages of listings, as the default provides).

    The FILE_SET_AREA function works fine as long as the user knows the complete internal code of a file area and types it in. However, this ordinarily consists of the internal code of the library + that of the area within the library. I don't want to require the user to type anything but the code of the area, without the library prefix.

    So how can I get a hold of either the internal code (preferably) or at least the short name of the currently selected library in a Baja program?

    "@LIB@" displays the library's short name but I haven't seen a way to do anything with @-codes except display them.

    ---
    ? Synchronet ? The Bauding House - baudhous.synchro.net


    they user doesnt have to know the internal code, that's for you to put
    into your .src


    setStr "uploads"
    FILE_SET_AREA
    file_upload
  • From Tegularius@BAUDHOUS to Jas Hud on Saturday, July 04, 2009 11:11:55
    Re: Re: Internal codes in Baja
    By: Jas Hud to All on Sat Jul 04 2009 06:03:30

    they user doesnt have to know the internal code, that's for you to put
    into your .src

    That's what I'm saying. I plan on having more than 20 libraries! Each
    will have its menu displayed to the user, with the brief codes for the areas (sometimes numeric, sometimes alphabetic). Thus the user will know the areas' codes. But I hope he won't need to know anything about the libraries' codes.
    The program will need to know that-- but alas, apparently can't.

    Guess I'll need to try javascript, as Digital Man suggests.

    ---
    ■ Synchronet ■ The Bauding House - baudhous.synchro.net
  • From Tegularius@BAUDHOUS to Digital Man on Saturday, July 04, 2009 11:21:55
    Re: Internal codes in Baja
    By: Digital Man to Tegularius on Fri Jul 03 2009 02:37:13

    I can't think of a way in Baja off-hand. My suggestion would be to use JavaScript instead where it is most certainly possible.

    "@LIB@" displays the library's short name but I haven't seen a way to do anything with @-codes except display them.

    If a file containing "@LIB@" were typed (in the CMD.EXE sense), but by SBBS ra ther than by CMD, with output redirected to second file, then the second file should contain the value of @LIB@ rather than the @-code itself, and a Baja script could read it. Is that possible?

    ---
    ■ Synchronet ■ The Bauding House - baudhous.synchro.net
  • From Jas Hud@jasonhDOVENET@eob-bbs.c0m to All on Saturday, July 04, 2009 17:40:52
    Tegularius wrote:
    Re: Re: Internal codes in Baja
    By: Jas Hud to All on Sat Jul 04 2009 06:03:30

    they user doesnt have to know the internal code, that's for you to put into your .src

    That's what I'm saying. I plan on having more than 20 libraries! Each
    will have its menu displayed to the user, with the brief codes for the areas (sometimes numeric, sometimes alphabetic). Thus the user will know the areas'
    codes. But I hope he won't need to know anything about the libraries' codes.
    The program will need to know that-- but alas, apparently can't.

    Guess I'll need to try javascript, as Digital Man suggests.

    ---
    ? Synchronet ? The Bauding House - baudhous.synchro.net


    i think i have a better idea. why dont you just keep the current
    listings and then draw ansi files for each file sub? that way you could control clutter and 'scrolling'

    check out the customization docs for more info.

    just so you know i have a shitton of file areas, so i'm getting what you
    are saying here.

    i think making a script you are talking about would be a lot of work for
    something users probably wouldnt use much.
  • From Digital Man to Tegularius on Saturday, July 04, 2009 16:30:03
    Re: Internal codes in Baja
    By: Tegularius to Digital Man on Sat Jul 04 2009 11:21 am

    Re: Internal codes in Baja
    By: Digital Man to Tegularius on Fri Jul 03 2009 02:37:13

    I can't think of a way in Baja off-hand. My suggestion would be to use JavaScript instead where it is most certainly possible.

    "@LIB@" displays the library's short name but I haven't seen a way to do anything with @-codes except display them.

    If a file containing "@LIB@" were typed (in the CMD.EXE sense), but by SBBS ra ther than by CMD, with output redirected to second file, then the second file should contain the value of @LIB@ rather than the @-code itself, and a Baja script could read it. Is that possible?

    No. For Baja, the @-codes are expanded during display to the remote user only.

    digital man

    Snapple "Real Fact" #53:
    The average women consumes 6lbs of lipstick in her lifetime.
  • From Tegularius@BAUDHOUS to Digital Man on Sunday, July 05, 2009 18:59:31
    Re: Internal codes in Baja
    By: Digital Man to Tegularius on Fri Jul 03 2009 02:37:13

    I can't think of a way in Baja off-hand. My suggestion would be to use JavaScript instead where it is most certainly possible.

    Can a JavaScript be called from a Baja program? If so, that would be
    nice to try. If not, then the entire shell might need to be written in JS.
    I'm totally new to this language. It looks exciting and would probably
    be rewarding to work with, but Lord, talk about a steep learning curve...

    I'm going to try a kludge first. Will let you know whether it works.

    ---
    ■ Synchronet ■ The Bauding House - baudhous.synchro.net
  • From Digital Man to Tegularius on Monday, July 06, 2009 12:08:56
    Re: Internal codes in Baja
    By: Tegularius to Digital Man on Sun Jul 05 2009 06:59 pm

    Re: Internal codes in Baja
    By: Digital Man to Tegularius on Fri Jul 03 2009 02:37:13

    I can't think of a way in Baja off-hand. My suggestion would be to use JavaScript instead where it is most certainly possible.

    Can a JavaScript be called from a Baja program?

    Yes, using the EXEC_BIN function or EXEC "?module".

    digital man

    Snapple "Real Fact" #116:
    The largest fish is the whale shark - it can be over 50 feet long and weigh 2 tons.
  • From Tegularius@BAUDHOUS to Jas Hud on Monday, July 06, 2009 01:38:09
    Re: Re: Internal codes in Baja
    By: Jas Hud to All on Sat Jul 04 2009 17:40:52


    i think i have a better idea. why dont you just keep the current
    listings and then draw ansi files for each file sub? that way you could control clutter and 'scrolling'

    I'm planning on it. The only drawback is that the file area must still
    be selected by number, right? What I would like to do is allow the user
    (in some cases) to choose the area using a mnemonic letter or string of
    several letters, which are highlighted in each menu.

    By the way, the kludge I mentioned wanting to try works! Sometimes it is
    slow, because it involves executing an external program.

    Also by the way, I was considering the possibility of alternate file paths,
    if only because the docs say somewhere that each file area defined takes
    up RAM. Do you know how much RAM, or at what point this might begin to
    be a problem? Vertrauen must have well over a hundred. I recall from
    three years ago (before my disk crash) I was offering the contents of
    at least a dozen CDs, each as a library, and most of them had at least
    thirty areas. I don't recall that performance suffered. The trouble with alternate paths is that adding more than about eighteen in scfg is a real
    pain because the window keeps bouncing back to the eighteenth. Perhaps this
    is a bug easily fixed?


    ---
    ■ Synchronet ■ The Bauding House - baudhous.synchro.net
  • From Digital Man to Tegularius on Monday, July 06, 2009 16:39:34
    Re: Re: Internal codes in Baja
    By: Tegularius to Jas Hud on Mon Jul 06 2009 01:38 am

    Re: Re: Internal codes in Baja
    By: Jas Hud to All on Sat Jul 04 2009 17:40:52


    i think i have a better idea. why dont you just keep the current
    listings and then draw ansi files for each file sub? that way you could control clutter and 'scrolling'

    I'm planning on it. The only drawback is that the file area must still
    be selected by number, right? What I would like to do is allow the user
    (in some cases) to choose the area using a mnemonic letter or string of several letters, which are highlighted in each menu.

    By the way, the kludge I mentioned wanting to try works! Sometimes it is slow, because it involves executing an external program.

    Also by the way, I was considering the possibility of alternate file paths, if only because the docs say somewhere that each file area defined takes
    up RAM. Do you know how much RAM, or at what point this might begin to
    be a problem? Vertrauen must have well over a hundred. I recall from
    three years ago (before my disk crash) I was offering the contents of
    at least a dozen CDs, each as a library, and most of them had at least thirty areas. I don't recall that performance suffered. The trouble with alternate paths is that adding more than about eighteen in scfg is a real pain because the window keeps bouncing back to the eighteenth. Perhaps
    this is a bug easily fixed?

    In 32-bit versions of Synchronet, the memory usage, in general, is not a concern. Alternate file paths were created to serve an organizational purpose (not to save memory). I'll look into the SCFG problem you mentioned.

    digital man

    Snapple "Real Fact" #14:
    Camel's milk does not curdle.