home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
db22re.zip
/
MENU.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-03-09
|
3KB
|
89 lines
/*
┌──────────────────────────────────────────────────────────────────┐
│ Name : curpos.cmd │
│ Purpose : experiment with REXXUTILS functions │
│ Platform : DB2/2 │
│ Author : Jeff Fisher │
│ IBM Toronto Development Lab │
│ Disclaimer : This "sample" code is for demonstrations only, no │
│ warrenties are made or implied as to correct │
│ function. You should carefully test this code in │
│ your own environment before using it. │
│ │
└──────────────────────────────────────────────────────────────────┘
*/
call ProgramInitialize
call MainMenu
call EndProg
MainMenu:
call SysCls
say c.itcyan '******************************************'
say c.yellow ' Menu experimentor '
say c.yellow ' '
say c.yellow ' _ 0 Choice 1 '
say c.yellow ' 1 Choice 2 '
say c.yellow ' 2 Choice 3 '
say c.yellow ' 3 Choice 4 '
say c.yellow ' x Exit '
say c.yellow ' '
say c.itcyan '******************************************' c.white
row = 3
col = 2
pos = SysCurPos(row,col)
selection = SysGetKey()
SELECT
WHEN selection = '0' then call ShowResults
WHEN selection = '1' then call ShowResults
WHEN selection = '2' then call ShowResults
WHEN selection = '3' then call ShowResults
WHEN selection = 'x' then signal EndProg
OTHERWISE NOP
END
signal MainMenu
ShowResults:
row = 15
col = 0
pos = SysCurPos(row,col)
say 'key pressed is = ' selection
return
ProgramInitialize:
call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
call SysLoadFuncs
call SetColor
return
EndProg:
exit
SetColor:
/*
*/
ansii.esc = '1B'x
c.normal = ansii.esc || '[0m'
c.highlite = ansii.esc || '[1m'
c.blackback = ansii.esc || '[40m'
c.green = c.normal || ansii.esc || '[32m'
c.grey = c.normal || ansii.esc || '[37m'
c.red = c.normal || ansii.esc || '[31m'
c.itred = c.highlite || ansii.esc || '[31m'
c.itgreen = c.highlite || ansii.esc || '[32m'
c.yellow = c.highlite || ansii.esc || '[33m'
c.itblue = c.highlite || ansii.esc || '[34m'
c.itmagenta = c.highlite || ansii.esc || '[35m'
c.itcyan = c.highlite || ansii.esc || '[36m'
c.white = c.highlite || ansii.esc || '[37m'
c.std = c.normal || c.itcyan || c.blackback
c.reset = c.normal || c.grey || c.blackback
return 0