home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
arexx
/
moos
/
demos
/
rexx_reqtools.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-25
|
4KB
|
155 lines
/*
* rexx_[SUB].library
*
* Test file...
*/
OPTIONS RESULTS
lib = 'rexxMOOS.library'; IF ~SHOW('L',lib) THEN CALL ADDLIB(lib,100,-30)
/*
* RqtEasyReq()
*/
CALL print(4,'#',"RqtEasyReq(bodytext,options)")
gad.0 = "No_no..."; gad.1 = "_One"; gad.2 = "_Two"; gad.3 = "T_hree"
gads = gad.1"|"gad.2"|"gad.3"|"gad.0
CALL print(20,'-','RqtEasyReq("Hello",'gads')')
CALL RqtEasyReq("Hello",''gads'')
SAY "You pressed '"COMPRESS(gad.result,"_")"'"
body = "Press any mouse button (IDCMP = mousebuttons)" || '0a'x ||,
"into the requester to close it or" || '0a'x ||,
"press any key (IDCMP = rawkey)..."
CALL print(20,'-','RqtEasyReq(body,"idcmp=mousebuttons|rawkey")')
SAY RqtEasyReq(body,'idcmp=mousebuttons|rawkey')
DROP gad.
/*
* RqtFileReq()
*/
CALL print(4,'#',"RqtFileReq(filename,directory,options)")
CALL print(20,'-','RqtFileReq(,,"Stem req.* Flags=multi")')
IF RqtFileReq(,,"Stem req.* Flags=multi") ~= "" THEN DO
SAY "req.FileName ==" req.FileName
SAY "req.Drawer ==" req.Drawer
SAY "req.Pattern ==" req.Pattern
DO n = 1 FOR req.0
SAY "req."n "==" req.n
END
END
DROP req.
CALL print(20,'-','RqtFileReq(,,"Flags=patgad|save")')
SAY RqtFileReq(,,"Flags=patgad|save")
dir = "DEVS:"
opts = "Pat #?.device Stem req."
CALL print(20,'-','RqtFileReq(,'dir','opts')')
SAY RqtFileReq(,dir,opts)
SAY "req.FileName ==" req.FileName
SAY "req.Drawer ==" req.Drawer
SAY "req.Pattern ==" req.Pattern
DROP req.
/*
* RqtFontReq()
*/
CALL print(4,'#',"RqtFontReq(options)")
CALL print(20,'-',"RqtFontReq('Stem fo. Flags=scale')")
CALL RqtFontReq('Stem fo. Flags=scale')
SAY "fo.Name ==" fo.Name
SAY "fo.YSize ==" fo.YSize
SAY "fo.Style ==" fo.Style
SAY "fo.Flags ==" fo.Flags
DROP fo.
/*
* RqtLongReq()
*/
CALL print(4,'#',"RqtLongReq(bodytext,options)")
opts = "Min 1 Max 100"
body = "How old are you?"
CALL print(20,'-','RqtLongReq("'body'",'opts')')
SAY "You are" RqtLongReq(body,opts) "years old... :-)"
/*
* RqtStringReq()
*/
CALL print(4,'#',"RqtStringReq(bodytext,string,options)")
opts = "MaxL 32"
body = "What's your name?"
CALL print(20,'-','RqtStringReq("'body'",,'opts')')
SAY "Your name is" RqtStringReq(body,,opts) ":-)"
opts = "MaxL 16 Hidden"
body = "New password:"
CALL print(20,'-','RqtStringReq("'body'",,'opts')')
SAY RqtStringReq(body,,opts)
/*
* RqtPaletteReq()
*/
CALL print(4,'#',"RqtPaletteReq(options)")
CALL print(20,'-','RqtPaletteReq(2)')
SAY RqtPaletteReq(2)
/*
* RqtScreenReq()
*/
CALL print(4,'#',"RqtScreenReq()")
CALL print(20,'-','RqtScreenReq()')
SAY RqtScreenReq()
opts = "Stem sm. Flags=sizegads"
CALL print(20,'-','RqtScreenReq('opts')')
SAY RqtScreenReq(opts)
SAY "sm.DisplayID ==" sm.DisplayID
SAY "sm.DisplayWidth ==" sm.DisplayWidth
SAY "sm.DisplayHeight ==" sm.DisplayHeight
SAY "sm.DisplayDepth ==" sm.DisplayDepth
SAY "sm.OverscanType ==" sm.OverscanType
SAY "sm.AutoScroll ==" sm.AutoScroll
opts = "Stem sm. Flags=allgads"
CALL print(20,'-','RqtScreenReq('opts')')
SAY RqtScreenReq(opts)
SAY "sm.DisplayID ==" sm.DisplayID
SAY "sm.DisplayWidth ==" sm.DisplayWidth
SAY "sm.DisplayHeight ==" sm.DisplayHeight
SAY "sm.DisplayDepth ==" sm.DisplayDepth
SAY "sm.OverscanType ==" sm.OverscanType
SAY "sm.AutoScroll ==" sm.AutoScroll
DROP sm.
ADDRESS COMMAND 'Wait' 2
SAY
EXIT 0
print: PROCEDURE
PARSE ARG pos,char,str
IF char = '#' THEN SAY '0a0a'x
SAY COPIES(char,pos) || OVERLAY(" "str" ",COPIES(char,78 - pos))
RETURN