DOS printing from FP menu

Brian K. White brian at aljex.com
Thu Oct 6 13:28:36 PDT 2005


----- Original Message ----- 
From: "Jim Asman" <jlasman at telus.net>
To: <filepro-list at seaslug.org>
Sent: Wednesday, October 05, 2005 7:56 PM
Subject: Re: DOS printing from FP menu


> --------------- Original Message ---------------
> At 07:07P Wed Oct 05 2005, Kenneth Brody wrote:
>
>> Quoting John Esak (Wed, 5 Oct 2005 18:45:55 -0400):
>> [...]
>> > I believe Jim has tried putting it in a batch file, etc. No joy. Even
>> > putting it in a filePro SYSTEM command doesn't work... yet the very 
>> > same
>> > EXACT command works from the DOS command line. So ignoring the "other"
>> > ways of doing it, which did fix his problem... he (and I) would still
>> > like to know why this is happening.
>>
>> This works just fine on my XP box.  Perhaps it's specific to 2003?
>>
>>     SYSTEM "print /? & pause"
>>
>> I get the print command usage message followed by "press any key to
>> continue".
>
> On 2003, it returns the "error" that...
>
> PRINT is an unknown command etc. etc.     wierd!
>
> But from the command line it behaves as you suggest.

Windows in general is a continual pain in the rear.

For my scanning add-on to work over the internet, I have to wrap my scanner 
executable in a small script on the client side.
I'm always hitting new glitches in that where it doesn't work on 
joe-random-new user.
The latest such incidnt was myself. It didn't work on the very machine it 
was developed on in the first place.

The problem was the batch file needs to run another batch file, and the 
official way to do that is the "call" comand.
If you don't use call (or maybe 'start' though that didn't always work) then 
it's like exec on unix or chain in filepro.
You move into the new script and don't come back from it.

Well I found out the hard way that in cmd.exe, %PATH% supercedes shell 
built-ins. I installed perl some time ago, and the installer added .pl file 
type to the registry and added some perl directories to the system wide 
path, and one of those directories had a call.pl, and after that, call 
statements in batch files don't work! Just Amazing.

I gave up and switched to supplying my own interpreter (zsh.exe) and keeping 
all necessary support files in their own dir, and at the top of the 
top-level script the first thing I do is set PATH to that directory and only 
that directory. Now the interpreter should always behave the same. I'm sure 
Windows will still find a way to throw me a curve somehow.

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list