Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!caesar.cs.montana.edu!ogicse!decwrl!aurora!geof From: geof@aurora.com (Geoffrey H. Cooper) Newsgroups: comp.lang.postscript Subject: Re: More help with Ultrascript wanted. Keywords: Ultrascript, QMS Message-ID: <1990Mar12.223842.8232@aurora.com> Date: 12 Mar 90 22:38:42 GMT References: <4896@rouge.usl.edu> Reply-To: geof@aurora.UUCP (Geoffrey H. Cooper) Organization: The Aurora Group, Palo Alto, CA Lines: 45 In article <4896@rouge.usl.edu> cs450125@pc.usl.edu (Sahoo Anirvudha) writes: >I can not get Ultrascript to work with it. The program (still.ps) writes the >optimized output directly to my screen and not to the printer. The interpreter >in Ultrascript tells me that it cannot directly access files, so that option USPC should be able to read or write files directly. If you type: (foo.ps)(w) file this should open "foo.ps" for write, trashing anything that was in there previously (be careful how you use this, folks). The current directory should default to the current directory when you started the PS job (from USPRINT or USPC or whatever). Some pitfalls in this: - Filenames follow MS-DOS syntax, hence some file names can't be used (e.g., extensions with >3 characters, more than two "."s and so on). - Directories can be specified using either slash / or backslash \, as in any MS-DOS system call. Note that you must double the backslash to put it into a PostScript string (hint: use slash): (c:\\mydir\\foo.ps)(r)file - To conditionally open a file, using "stopped" to catch the error from the "file" operator. - There is a very severe limit on the number of files that can be opened at a time. Typically, this is enough to say "(foo)run" from executive, but not to have the file "foo" contain another file open. Hint: the executive itself uses at least one extra file descriptor, so try running the file in question directly using "print" instead of executive. - Files are always opened in binary mode. You may see a trailing "^Z" when reading it. - As with any MS-DOS program, disk corruption results when the same file is opened twice simultaneously for reading and writing. - Don't forget to close the file or you may get nothing. -- geof@aurora.com / aurora!geof@decwrl.dec.com / geof%aurora.com@decwrl.dec.com