question using a menu script
Kenneth Brody
kenbrody at spamcop.net
Thu Apr 19 09:16:17 PDT 2012
On 4/19/2012 11:58 AM, Richard Hane wrote:
> From: GCC Consulting<rkreiss at gccconsulting.net>
[...]
>> Suggestion: Use a clerk session with a menu selection for printing or
>> pdf. Then use a system command to execute the correct option. I have
>> set this up for one of my clients and I works just fine.
>
> Richard,
>
> Thanks for the idea. It sounds like this would be the answer; however
> when I set it up it just plain didn't work. Nothing changed.
Define "didn't work". Define "nothing changed".
> I set up a new file select_printer with 2 fields. Fld 1 ask press 1 for
> printer and 2 for pdf. Fld 2 asks for the printer name (ie. rick, eng,
> rickpdf, etc.
>
> Below is my processing..
>
> 1. if: 1="1"
> then: ca="set pfprinter="{2{""; cb="set pfpostprint' "; goto dosys
> 2: if: 1="2"
> then: ca="set pfprinter=rickpdf"
> 3. if: 1="2" then: cb="set pfpostprint=C:\Program Files\Rasmussen
> Software, Inc\Print Wizard 4\printwiz /fpDF://V:\rickpdf\"
> 4. if: 1="2"
> then: goto dosys
> 5. then: beep; errorbox "Must select 1 or 2 in 1st question"; restart
> 6. then: end
> 7. label: dosys
> if:
> then: system ca
> 8. if:
> then: system cb
> 9. end
>
> Do you see my problem or what I did wrong? BTW I do get a syntax error
> on the end of line 3 after the V:\ and yes this is a valid mapped
> drive.
There are several things wrong here.
First, a statement such as
SYSTEM "set foo=bar"
is a no-op. It calls a shell to set the environment variable, and then
exit. Once the shell exits, its environment (along with the new variable)
is gone. Use PUTENV if you want to take this approach.
Second, the syntax error (which I assume is coming from filePro, and not the
command shell) is due to ending the line with backslash-quote. Put a space
after the backslash.
Finally, if filePro is giving you a syntax error, how can you be running it?
> I should point out for what it's worth; I am running in the virtual XP
> mode on a Win 7 O/S.
It's irrelevant in this case, but it never hurts to include that info,
because sometimes it does matter.
[...]
--
Kenneth Brody
More information about the Filepro-list
mailing list