menu script enhancement idea

Bob Stockler bob at trebor.iglou.com
Mon Jul 24 10:47:09 PDT 2006


John Esak wrote (on Sun, Jul 23, 2006 at 10:26:51PM -0400):

| Wouldn't it be easy to incorporate the passing of variables to the menu
| scripts by doing something like this...
| 
| menu.-A var1 var2 var3 var4 ...
| 
| Couldn't it be arranged to pass these in as $1 $2 $3 ... to the called
| script?  There are any number of really good reasons for being able to do
| this.  I don't think it would be too difficult to add and it certainly
| wouldn't cause any backward compat issues. how about a 5.6.4 release?? :-)
| 
| Example:
| 
| menu.-A 2006
| 
| and the script reads
| 
| /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_1
| /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_2
| /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_3
| ...
| 
| Actually, this is a pretty weak example... but you get the idea.

I can see how you could implement this on UNIX/Linux using
processing table user menus, but (unfamiliar as I am with
it) I don't think Windows batch file put their arguments
into variables (if they pay attention to arguments at all).

In a regular filePro User Menu, and the user elected Choice A,
how would the program executing the menu know to prompt for
arguments to the script, and how many arguments to prompt for?

In a processing table menu, in the subroutine called by the
menu choice, you could use PUTENV() to furnish values for the
variables in an already-written script or batch file, or - better
yet - use filePro File I/O to write the script or batch file on
the fly with everything having its proper value.

Bob

-- 
Bob Stockler  +-+  bob at trebor.iglou.com  +-+  http://members.iglou.com/trebor


More information about the Filepro-list mailing list