home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d3xx
/
d308
/
freq.lha
/
FReq
/
FReq.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-01-18
|
2KB
|
73 lines
/* FReq.rexx - This Program tests all the FileRequester's commands */
if ~(Show('P', 'FileRequester')) then /* Is FReq resident in memory ? */
do /* if not RUN it */
ADDRESS COMMAND "Run >NIL: <NIL: DEVS:FReq >NIL: <NIL:"
ADDRESS COMMAND "C:WaitForPort FileRequester"
if ~(Show('P', 'FileRequester')) then
do
say "UnAble to Load FileRequester"
exit
end
end
OPTIONS RESULTS
ADDRESS "FileRequester"
'GETFILENAME' /* This is the Easiest way to Call FReq */
if (RC = 0) then
say 'Returned Filename - ' Result
else
say 'No FileReturned'
/* Let's Ask for another name */
'DisplayDef' /* Tells FReq to use the Default Settings */
'SetPattern' '#?c#?' /* Sets the Default Pattern Specification */
'SetPath' 'SYS:C' /* Sets the Default Path */
'SetFileName' 'NoName' /* Sets the Default File Name */
'SetTitle' 'This is REXX test NUMber 2'
'GETFILENAME' /* Ask FReq to return a File Name */
select
when RC = 0 then
say 'Returned Filename - ' Result /* returned a File Name */
when RC = 1 then
say '<<CANCEL>>' /* User hit the Cancel Gadget */
when RC = 2 then
say '<<CLOSED>>' /* User closed down FReq */
otherwise
say 'UnKnown Return from FReq'
end
/* Let's Ask for another name */
'DisplayDef'
'SetPath' 'SYS:'
'SetPattern' /* Clear the Pattern */
'SetFileName' /* Clear the File Name */
'SetTitle' 'Info Files Should be Listed'
'DisplayInfo ON' /* Tell FReq to display the .info files */
'GETFILENAME'
if (RC = 0) then
say 'Returned Filename - ' Result
else
say 'No FileReturned'
/* Let's Ask for another name */
'DisplayDef'
'SetTitle No Info Files this Time'
'DisplayInfo off'
'GETFILENAME'
if (RC = 0) then
say 'Returned Filename - ' Result
else
say 'No FileReturned'
'CloseDown' /* Get FReq out of Memory */