home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
useful
/
util
/
edit
/
mg
/
rexx
/
requestfile.mg
< prev
next >
Wrap
Text File
|
1990-06-02
|
973b
|
33 lines
/*
* Just for grins - go get a file name via the ARP file requrester,
* and then load the file.
*/
/* Add the library */
if ~show('Libraries', 'rexxarplib.library') then
if ~addlib('rexxarplib.library', 0, -30, 0) then do
call log 1, "No rexarp library, exiting!"
exit 20
end
newfile = GetFile(20, 20, pragma('Directory'), '', 'Find File?')
/* Check for CANCEL or no file selected */
if newfile = "" then exit 2
/*
* Check for directory selected, in which case I die (no dired). Those who
* use may wish to invoke it at this point.
*/
if index("/:", right(newfile, 1)) ~= 0 then exit 1
/*
* Finally, do a find-file. I use this for pedegogical reasons; those
* who really want requesters everywhere might want to copy this file,
* and change the command/hailstring for other commands (or maybe create
* a single Rexx script that takes two arguments, the hailstring & command,
* and uses this in the appropriate places.
*/
'find-file' newfile
exit rc