RR in Linux help shell and menu

Klaus Major klaus at major-k.de
Tue Aug 19 16:58:01 EDT 2003


Hi Glen,

> I am hoping someone can offer a few suggestions for the following:
>
> I wish to use RR for a Linux app. There are several commands that I 
> can run
> but they have many switch options!
>
> I plan to list the commands to a user (invest, divest, suggest) and 
> their
> available switches via a check box
>
> For example for divest command piped to a file called "Hfund" Later I 
> will
> need to read the file into RR to present the results :
>
> divest -r -s BOB > Hfund
>
> My question is what is the proper way to use the shell command?

...
get shell"divest -r -s BOB > Hfund"
if the result <> empty then
   ### did not work somehow...
end if
...

This is the syntax...

> And how should I call the check box of options once the command has 
> been
> selected?

You could check the hilites of these checkboxes (maybe in a loop) and 
create the
apropriate string for the shell command like:

...
put "divest" into the_shell
if the hilite of btn "flag1" then put SPACE & "-r" after the_shell
if the hilite of btn "flag2" then put SPACE & "-s" after the_shell
...
if fld "outputfile" <> empty then put SPACE & "<" && fld "outputfile" 
after the_shell
get shell(the_shell)
...

You get the picture...

> Does it even make sense to use a check box to let the user select their
> options (later on I will need to be able to allow the user to input
> particular data as an option requires ...date range, threshold etc) So 
> I
> would like to plan the proper way in the beginning.

Sounds like a good idea to me :-)

So one can also learn about the different flags for the different 
commands ;-)

> Any suggestions are appreciated.

You could create different sets (read: groups) of checkboxes for the 
commands
and show/hide these sets accordingly...

Should be pretty easy...

Drop a line or two if you need more info/assistance :-)

> regards,
>
> Glen

Regards

Klaus Major
klaus at major-k.de
www.major-k.de




More information about the use-livecode mailing list