home *** CD-ROM | disk | FTP | other *** search
- /* View (REXX) - Uses FReq as a picture Viewing program. */
- /* Written By: Jeff Wahaus - This program is Public Domain */
-
- /* Uses the Show, SHAMView, HAMGif, Dyna-Show, and MacView programs to
- view IFF, SHAM, GIF, Dynamic Hi-Res, and Macintosh picture files.
-
- Note that this program assumes that the above programs are located
- in your C: directory. Change the PATH varible to have it look some
- where else.
-
- Also, this program determines picture type by the filename's extension.
- you need to name your picture files in a consistant manor.
-
- Note that: .pic .hm .ham .iff = IFF picture File
- .sham = Sliced HAM picture
- .dyn .dhs = Dynamic Hi-Res picture
- .gif = GIF picture File
- .mac = Macintosh picture file
- */
-
- PATH = "C:" /* Change this to point to your Viewing programs */
- /* ** NOTE ** PATH must end with ':' or '/' */
-
- if ~(Show('P', 'FileRequester')) then /* Looking for FReq */
- do
- ADDRESS COMMAND "C:Run <NIL: >NIL: DEVS:Freq <NIL: >NIL:"
- ADDRESS COMMAND "C:WaitForPort FileRequester"
- if ~(Show('P', 'FileRequester')) then
- exit
- end
-
- OPTIONS RESULTS
- ADDRESS "FileRequester" /* the following commands go to FReq */
- 'SetFileName' /* clear the file name */
- 'SetPattern' /* clear the pattern */
- more = "TRUE"
- do while more = "TRUE"
- 'SetTitle View_All - Select a Picture to View'
- 'DisplayDef' /* display default settings */
- 'GETFILENAME'
- if (RC = 0) then
- do
- filename = Result
- extension = right(filename, 4)
- extension = upper(extension)
- if ((extension = ".PIC") | (right(extension, 3) = ".HM") | (extension = ".HAM") | (extension = ".IFF")) then
- ADDRESS COMMAND PATH || "Show" '"' || filename || '"'
- else if (extension = "SHAM") then
- ADDRESS COMMAND PATH || "ShamView" '"' || filename || '"'
- else if ((extension = ".DYN") | (extension = ".DHS")) then
- ADDRESS COMMAND PATH || "Dyna-Show" filename
- /* Dyna-Show dosn't like quotes around a filename */
- else if (extension = ".GIF") then
- ADDRESS COMMAND PATH || "HAMGIF" '"' || filename || '"'
- else if (extension = ".MAC") then
- ADDRESS COMMAND PATH || "MacView -b -f -h" filename
- /* MacView dosn't like quotes around a filename */
- else /* try to show it anyway */
- ADDRESS COMMAND PATH || "Show" '"' || filename || '"'
- end
- else
- more = "FALSE" /* User hit CANCEL or Close Window */
- end /* while */
- exit
-