user command
Ken Cole
ken.m.cole at gmail.com
Tue Oct 6 16:38:02 PDT 2009
First point, John is 100% correct, use opendir! USER is the hammer while
opendir is the correct tool, the screwdriver.
Second point, if you want to persist with USER then Mark is mostly right :)
The USER command doesn't take parameters in the filePro code like:
user mycmd=myprogram par1 par2 par3
but can take parameters, like this:
user mycmd=myprogram
mycmd="par1"
aa=mycmd
Mark is right in that the USER command should be a wrapper. The program
linked to by the USER command must loop looking for input, parameters, and
then return data based on that parameter and then loop again, usually until
it gets a parameter to exit.
Hope this helps
Ken
On Wed, Oct 7, 2009 at 9:15 AM, Fairlight <fairlite at fairlite.com> wrote:
> You'll never BELIEVE what Chris Rendall said here...:
> > I'm using the "user" command to run a script in Linux to get a list
> > of files in a directory on a Windows share. Is there a way to use a
> > parameter with the "user" command? The name of the directory I want to
> > get the list of files from changes depending on the job number.
> >
> > I've done this before with the "user" command, but in that program I'm
> > always looking in the same directory to get the list of names to display
> > in the listbox.
>
> I wanted to say yes, just create a variable with the full command and use
> it, but I don't believe that's the case. I seem to remember the late
> Bob Stockler saying several times on the list that USER had a number of
> restrictions on it, and not having arguments was one of them.
>
> Two solutions come to mind:
>
> 1) Rewrite the program you're using to get the list of files to read one
> line of input before performing its check, and have it use that input as
> the path.
>
> 2) If you can't rewrite the actual program, write a wrapper program that
> does the above and then calls the actual program.
>
> You've got a two-way pipe right there, why not use the second direction?
>
> mark->
> --
> Audio panton, cogito singularis,
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20091007/d5868467/attachment.html
More information about the Filepro-list
mailing list