PFPOSTPRINT question
Don Coleman
dcoleman at dgcreact.com
Fri Jun 25 08:12:24 PDT 2004
Kenneth Brody wrote:
> Don Coleman wrote:
> [...]
> [...]
> > > > If: HY ne ""
> > > > Then: putenv "PFPOSTPRINT","C:\\PRINTWIZ\\PRINTWIZ.EXE
> > > > /P\I-4308"{HY C:\\PRINTWIZ\\HARDCOPY.TXT";'goto pickprt
> > >
> > > This is not a valid statement, and should be generating a syntax error,
> > > as you do not have balanced quotes.
> > >
> >
> > This both passes syntax check (fPv5.0.06 native development) and does not issue an
> > error at
> > run-time fPv5.0.13 native QS rclerk (other than my windows printer error).
>
> dcabe 5.0.06D9 gives this error, exactly as expected:
>
> ======
>
> *** A filePro Error Has Occurred ***
>
> Line Number: 2
>
> putenv "PFPOSTPRINT","C:\\PRINTWIZ\\PRINTWIZ.EXE /P\I-4308"{HY C:\\PRINTWIZ\\HAR
> DCOPY.TXT";'goto pickprt
> ^
> Process contains a syntax error at position indicated.
>
> ======
>
> [...]
> > C:\PRINTWIZ\PRINTWIZ.EXE /P-4308{HY C:\PRINTWIZ\HARDCOPY.TXT
> [...]
>
> This is what I would expect if the quote that you show between I-4308
> and {HY weren't there.
>
> Also, please note that you do not want double backslashes in the
> environment variable, as that will totally confuse Windows. (The
> double-backslash is used for system names, like "\\server\printer".)
>
>
Ken & others:
Since I was fumbling around attempting to come up with the correct combination of
backslashes and quotes in my PFPOSTPRINT command I came up with the following by
splitting the expression into two dummy variables as:
25 ------- - - - - - - - - - - - - - - - -
If: HY ne ""
Then: HS="C:\PRINTWIZ\PRINTWIZ.EXE I-4308"{HY;HT="C:\PRINTWIZ\HARDCOPY.
TXT";putenv "PFPOSTPRINT",HS<HT;goto pickprt
Prints to the correct printer w/o any windows error messages. Is there any reason this
is not an acceptable solution? I left HS and HT un-defined. Hopefully that causes no
ill.
Donald G. Coleman, Consultant
2100 Birchwood Dr.
Indiana, PA 15701
dcoleman at dgcreact.com
(724) 349-6302
> --
> +-------------------------+--------------------+-----------------------------+
> | Kenneth J. Brody | www.hvcomputer.com | |
> | kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
> +-------------------------+--------------------+-----------------------------+
>
> ---
> [This E-mail scanned for viruses by Declude Virus]
---
[This E-mail scanned for viruses by Declude Virus]
More information about the Filepro-list
mailing list