Subj : baja
To   : Ace
From : PistolGrip
Date : Wed Feb 13 2002 08:43 pm

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