• baja

    From Ace@DSTREAM to ALL on Wednesday, February 13, 2002 13:17:00
    Is there an easy way to do this in baja?

    If xxxx.bin is running from logon/login, show/do this
    If it is running from elsewhere (ie. a menu), do this instead

    ---
    ■ QMPro 1.53 ■ telnet://dsbbs.net - http://www.dsbbs.net
    ■ Synchronet ■ Data Stream - telnet://dsbbs.net - www.dsbbs.net
  • From PistolGrip@WASTELND to Ace on Wednesday, February 13, 2002 20:43:00
    RE: baja
    BY: Ace to ALL on Wed Feb 13 2002 09:17 pm

    Is there an easy way to do this in baja?

    If xxxx.bin is running from logon/login, show/do this
    If it is running from elsewhere (ie. a menu), do this instead


    Sure, you use command line paramters when calling your module from each location. Then you just need to do a simple check of them to see what code to execute.

    You would execute the module something like:

    exec "*MYMOD -option1 -option2"


    Then, at the beginning of your module somewhere right before entry point justy add a couple lines like this to grab the command line paramters before str gets over written. (the command line parameters are automatically put into "str" when you execute a BAJA modules).

    #########
    copy cmdline str
    strupr cmdline
    #########

    From there is simple checks on the cmdline variable to control where your program goes.

    PG

    ---
    ■ Synchronet ■ WasteLand BBS ■ telnet://wasteland-bbs.com
  • From Amcleod to PistolGrip on Wednesday, February 13, 2002 22:50:07
    Re: baja
    By: PistolGrip to Ace on Thu Feb 14 2002 04:43 am

    If xxxx.bin is running from logon/login, show/do this
    If it is running from elsewhere (ie. a menu), do this instead


    Sure, you use command line paramters when calling your module from each location. Then you just need to do a simple check of them to see what code execute.

    Depending on where it is called you may be able to just check to see if the user has logged in already.
  • From Ace@DSTREAM to PISTOLGRIP on Thursday, February 14, 2002 03:39:00
    To: PistolGrip
    Subject: baja

    RE: baja
    BY: Ace to ALL on Wed Feb 13 2002 09:17 pm

    Is there an easy way to do this in baja?

    If xxxx.bin is running from logon/login, show/do this
    If it is running from elsewhere (ie. a menu), do this instead


    Sure, you use command line paramters when calling your module from each
    location. Then you just need to do a simple check of them to see what code t
    execute.

    You would execute the module something like:

    exec "*MYMOD -option1 -option2"


    Then, at the beginning of your module somewhere right before entry point just
    add a couple lines like this to grab the command line paramters before str ge
    over written. (the command line parameters are automatically put into "str"
    when you execute a BAJA modules).

    #########
    copy cmdline str
    strupr cmdline
    #########

    From there is simple checks on the cmdline variable to control where your
    program goes.

    Woo! That should work great, thanks!

    Why strupr? Personal preferance?

    ---
    ■ QMPro 1.53 ■ telnet://dsbbs.net - http://www.dsbbs.net
    ■ Synchronet ■ Data Stream - telnet://dsbbs.net - www.dsbbs.net
  • From PistolGrip@WASTELND to Ace on Thursday, February 14, 2002 06:15:00
    RE: baja
    BY: Ace to PISTOLGRIP on Thu Feb 14 2002 11:39 am

    Woo! That should work great, thanks!

    Why strupr? Personal preferance?

    Not necessary really, just makes it easier to compare mixed-case parameters.

    PG

    ---
    ■ Synchronet ■ WasteLand BBS ■ telnet://wasteland-bbs.com