home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxlbox13.zip / rxlbox.men < prev    next >
Text File  |  1998-03-01  |  80KB  |  2,174 lines

  1. ;
  2. ; Sample menu description file for RxLBox version v1.30
  3. ;
  4. ; Contents
  5. ; ========
  6. ;
  7. ; A menu description file contains the menu descriptions for RxLBox.
  8. ; This menu description file contains all possible entries for a menu
  9. ; description file including an description for every entry.
  10. ;
  11. ;
  12. ; Last Update:
  13. ; ============
  14. ;
  15. ;   01.05.1997 for Version v1.22 /bs
  16. ;
  17. ;
  18. ; General
  19. ; =======
  20. :
  21. ;   - lines beginning with a semicolon ';' are comments
  22. ;
  23. ;   - comment lines and empty lines are ignored
  24. ;
  25. ;   - lines before the first section are ignored
  26. ;
  27. ;   - all unknown sections are ignored
  28. ;
  29. ;   - no part of the menu description is case-sensitive
  30. ;
  31. ;   - leading and trailing blanks are ignored
  32. ;
  33. ;   - to use multiple lines for an entry use a backslash
  34. ;     '\' at the end of the line that continues on the
  35. ;     next line. Use '^\' to add a backslash at the end
  36. ;     of a line without using it as continuation char.
  37. ;
  38. ;   - the length of a line is not limited
  39. ;
  40. ;   - the order of the sections is meaningless. The only
  41. ;     exception to this rule is the menu DEFAULTMENU
  42. ;     (see below)
  43. ;
  44. ;   - RxLBox reads the menu descriptions only once at program start
  45. ;
  46. ;
  47. ; Format
  48. ; ======
  49. ;
  50. ; Menu descriptions are in the Windows INI file format.
  51. ;
  52. ; All sections begin with
  53. ;
  54. ;   [section_name]
  55. ;
  56. ;
  57. ; All entries in the sections are in the format
  58. ;
  59. ;   key=value
  60. ;
  61. ; The only exception to this rule are the entries in the
  62. ; sections for the online help topics (see below).
  63. ;
  64. ; 'key' is one of the defined keys for the approbiate section;
  65. ; 'value' is the value for that key. For some, but not all,
  66. ; keys 'value' is optional.
  67. ;
  68. ; You can surround 'value' with '(' and ')'. In this case
  69. ; RxLBox treats the value as a REXX statement and evaluates
  70. ; it using INTERPRET while_reading_the_menu_description.
  71. ; The REXX statement must evaluate to a string!
  72. ; This is possible for _all_ entries in the menu description.
  73. ; You can read and change the exported REXX variables
  74. ; (see below) in REXX statements.
  75. ;
  76. ; You can surround 'value' also with '{' and '}'. In this
  77. ; case RxLBox treats the value also as a REXX statement but
  78. ; the evaluation of the REXX statements takes place
  79. ; just_before_the_value_is_used (executed, displayed,
  80. ; returned, ... depending on the type of the key)
  81. ; The REXX statement must evaluate to a string!
  82. ; You can read and change the exported REXX variables
  83. ; (see below) in REXX statements.
  84. ; Please note that REXX statements enclosed in '{' and '}' can
  85. ; not contain '}'. Use the ASCII code 125 ('7D'x) instead.
  86. ;
  87. ; This is possible for all entries of the menu description
  88. ; except the following keys:
  89. ;
  90. ;   - all entries for color definitions
  91. ;   - the key CLS
  92. ; and
  93. ;   - the key ACCEPTALLINPUT
  94. ;
  95. ;
  96. ; Menu definitions
  97. ; ================
  98. ;
  99. ; Sections with a menu definition must begin with
  100. ;
  101. ;   [*menu_name*]
  102. ;
  103. ; where 'menu_name' is the name of the menu. All characters are
  104. ; possible for the name of a menu.
  105. ; The name of a menu can NOT begin with an exclamation mark '!' or
  106. ; an underscore '_'. 'menu_name' can not have leading or trailing
  107. ; blanks but imbedded blanks are ok.
  108. ; Note: You shouldn't use '[', ']', '*', and ',' in menu names.
  109. ;       You can not use the NULL character '00'x in menu names.
  110. ;
  111. ; The name of a menu can have up to 74 chars. Each menu
  112. ; must have a unique name (except the DEFAULTMENU see below).
  113. ;
  114. ; The number of menu definitions is not limited.
  115. ;
  116. ;
  117. ; Menu names with a special meaning
  118. ; ---------------------------------
  119. ;
  120. ; The following menus have a special meaning (if defined):
  121. ;
  122. ;   DEFAULTMENU
  123. ;
  124. ; This menu contains the default values for all following
  125. ; menus. Menu entries defined in this menu are ignored.
  126. ; You can redefine the DEFAULTMENU at any time and as often
  127. ; as you like.
  128. ; This menu is optional. Menus without a DEFAULTMENU defined
  129. ; before them use the program internal default values.
  130. ; For values not defined in a DEFAULTMENU the value from the
  131. ; previous DEFAULTMENU (or the program internal defaults if
  132. ; no previous DEFAULTMENU exist) are used.
  133. ;
  134. ;   MAINMENU
  135. ;
  136. ; This is the menu called by RxLBox.CMD if there's no menu
  137. ; parameter in the command line.
  138. ; This menu is optional if RxLBox.CMD is called with the
  139. ; menu parameter.
  140. ;
  141. ;
  142. ; Internal menus
  143. ; --------------
  144. ;
  145. ; There are three internal menus. Due to the restrictions 
  146. ; for menu names the user defined menus can not interfere 
  147. ; with them. The internal menus use the colors defined in
  148. ; the _last_ DEFAULTMENU in the menu description.
  149. ; You can not redefine any other part (keys,
  150. ; and so on) of the internal menus. To redefine the
  151. ; messages used in these menus, you must use an external
  152. ; message handling routine.
  153. ;
  154. ;
  155. ; Menu entries
  156. ; ------------
  157. ;
  158. ; All menu entries are in the format
  159. ;
  160. ;   key=value
  161. ;
  162. ; 'key' must be one of the defined keys (see MAINMENU
  163. ; for the description of all defined keys) and 'value'
  164. ; must be an approbiate value for that key.
  165. ;
  166. ;
  167. ; Exported REXX variables
  168. ; -----------------------
  169. ;
  170. ; The following REXX variables are exported by RxLBox (means:
  171. ; They are maintained by RxLBox and you can use them in menu
  172. ; definitions):
  173. ;
  174. ; variable         meaning
  175. ; --------------------------------------------------------------------
  176. ; !curMainMenu     name of the main menu
  177. ; !curMenu         current menu name
  178. ;
  179. ; !curMenuEntry    current menu entry name (not evaluated!)
  180. ; !curMenuEntry1   current menu entry name (evaluated!)
  181. ; !curMenuAction   current menu entry action
  182. ; !curCmd          current command executed by RxLBox
  183. ; !curPageNo       number of the current menu page
  184. ; !totalPageCount  total number of pages in this menu
  185. ; !curLineNo       number of the active menu line (relative, range: 1..14)
  186. ; !curEntryNo      number of the current menu entry
  187. ; !totalEntryCount total number of entries in this menu
  188. ; !curRC           special variable to communicate with RxLBox
  189. ;                  (see below)
  190. ;
  191. ;
  192. ; Note that these variables are set to '' while reading the menu
  193. ; description. You should use them only in REXX statements executed
  194. ; while running a menu (enclosed in '{}'). You can change the value
  195. ; of any of these values but these changes are local on a per
  196. ; statement base.
  197. ;
  198. ; You can read and write to the stem 'MenuDesc.' to use global
  199. ; REXX variables in the menu descriptions (see the menu
  200. ; PasswordMenu below for an example). This stem is initialized
  201. ; with '' at program start.
  202. ; All other REXX variables used in REXX statements in the menu
  203. ; descriptions are local variables on a per statement base!
  204. ;
  205. ; Note further that you can neither read nor write the other REXX
  206. ; variables used by RxLBox!
  207. ;
  208. ; In general you should use the stem 'MenuDesc.' to share variables
  209. ; between REXX statements in the menu descriptions and environment
  210. ; variables to share variables with other REXX programs.
  211. ;
  212. ;
  213. ; Changing the behaviour for CTRL-C
  214. ; ---------------------------------
  215. ;
  216. ; You may set the REXX variable "MenuDesc.__NoHalt" to a value not
  217. ; equal "" to force RXLBOX to ignore CTRL-C.
  218. ; If the variable MenuDesc.__NoHalt is set to "", CTRL-C pressed
  219. ; while in the menu aborts the program.
  220. ; This is the default behaviour.
  221. ;
  222. ; You can set this variable for example in the value for the keyword
  223. ; OnInit or OnMainInit.
  224. ;
  225. ; See the section about "OS/2 commands" below for
  226. ; a bug of the CMD.EXE (including a workaround).
  227. ;
  228. ;
  229. ;
  230. ; Exported REXX routines
  231. ; ----------------------
  232. ;
  233. ; The following routines are exported by RxLBox (means: You can use
  234. ; them in your menu definitions):
  235. ;
  236. ;
  237. ; - ShowWorkingMessage
  238. ;
  239. ;   function: Show a message in a centered box on the screen
  240. ;
  241. ;   usage:    call ShowWorkingMessage msg_to_show {,wait} {,noCLS}
  242. ;
  243. ;   where:    msg_to_show
  244. ;               This is the message text
  245. ;               The maximum length for the message is 76. Messages
  246. ;               longer than 76 chars are truncated.
  247. ;
  248. ;             wait
  249. ;               Do or do not wait for a key
  250. ;               If wait is 1, ShowWorkingMessage waits for a key
  251. ;               after displaying the message.
  252. ;
  253. ;             noCls
  254. ;               If this parameter is 0 RxLBox does not clear the
  255. ;               screen before displaying the message
  256. ;
  257. ;   returns:  ''
  258. ;
  259. ;   Notes:    Note that ShowWorkingMessage used from within a menu
  260. ;             description does not check the quiet parameter.
  261. ;
  262. ;
  263. ; - EnvValue
  264. ;
  265. ;   function: Set and/or get the value of an environment variable
  266. ;
  267. ;   usage:    curEnvValue = EnvValue( envVar {, newEnvValue } )
  268. ;
  269. ;   where:    curEnvValue
  270. ;               This is the current value of the environment variable,
  271. ;             envVar
  272. ;               This is the name of the environment variable
  273. ;             newEnvValue
  274. ;               This is the new value for the environment variable
  275. ;
  276. ;   note:     This is a short cut for the REXX function VALUE().
  277. ;
  278. ;   Examples:
  279. ;
  280. ;   - get the value of an environment variable:
  281. ;
  282. ;       myEnvVar = EnvValue( 'COMSPEC' )
  283. ;
  284. ;   - set the value of an environment variable:
  285. ;
  286. ;       call EnvValue 'MYENVVAR', 'MYENVVALUE'
  287. ;
  288. ;   - get and set the value of an environment variable:
  289. :
  290. ;       OldValue = EnvValue( 'MYENVVAR', newValue )
  291. ;
  292. ;
  293. ;
  294. ; - WaitForAKey
  295. ;
  296. ;   function: Wait for a single key
  297. ;
  298. ;   usage:    call WaitForAKey {showPrompt}
  299. ;
  300. ;   where:    showPrompt
  301. ;               If this parameter is set to 1, WaitForAkey shows the
  302. ;               default prompt message of the PAUSE command. If the
  303. ;               parameter is not equal 1 or ommitted, WaitForAkey does
  304. ;               not show any prompt.
  305. ;
  306. ;
  307. ;   returns:  ''
  308. ;
  309. ; Hint: To define a REXX subroutine in the menu description file
  310. ;       save it in the stem menuDesc. and execute it with
  311. ;       'interpret menuDesc.myREXXCode' where myREXXCode is the
  312. ;       used tail.
  313. ;
  314. ;
  315. ; Macro definitions
  316. ; =================
  317. ;
  318. ; Sections with macros for the inputline must begin with
  319. ;   [MACROLIST]
  320. ;
  321. ; See the sample macro lists below for the format of the entries
  322. ; in this section.
  323. ;       
  324. ;
  325. ; Online help topics
  326. ; ==================
  327. ;
  328. ; Sections with a topic for the online help must begin with
  329. ;
  330. ;   [<help_topic>]
  331. ;
  332. ; where 'help_topic' is the name of the online help topic referenced
  333. ; in the menu description keys 'HelpForF1', 'HelpForALT_F1' or
  334. ; 'HelpForCTRL_F1' (see the descriptions of the main menu below;
  335. ; see the end of this file for some example help topic sections).
  336. ;
  337. ; The following help topics are used for the internal menus:
  338. ;
  339. ;   MenuListOnlineHelp
  340. ;     - F1 in the Menu List
  341. ;
  342. ;   HistoryListOnlineHelp
  343. ;     - F1 in the History List
  344. ;
  345. ;   MacroListOnlineHelp
  346. ;     - F1 in the Macro List
  347. ;
  348. ;   InternalMenu_InputLineHelp
  349. ;     - ALT-F1 in the Menu List, the History List and the Macro List
  350. ;
  351. ;   InternalMenu_KeyHelp
  352. ;     - CTRL-F1 in the Menu List, the History List and the Macro List
  353. ;
  354. ;
  355. ;
  356. ;
  357. ; Using OS/2 commands and RxLBox commands
  358. ; =======================================
  359. ;
  360. ; You can use OS/2 commands and RxLBox commands for Menu entry actions,
  361. ; macros, and function keys.
  362. ;
  363. ;
  364. ; OS/2 commands
  365. ; -------------
  366. ;
  367. ; To use an OS/2 command for a function key or a macro just enter 
  368. ; the command and the parameters. Preceed the command with an
  369. ; asterix '*' to wait for a keystroke after the execution. 
  370. ; OS/2 commands can not begin with a dash '#'. 
  371. ;
  372. ; To use an OS/2 command for menu entries you must use the RxLBox
  373. ; command '#EXECUTECMD' (see below).
  374. ;
  375. ; Please note that there is a bug in the CTRL-C handling of the 
  376. ; CMD.EXE. Due to this bug CTRL-C pressed while calling an internal
  377. ; command (like DIR, or PAUSE) from within an RxLBox menu aborts 
  378. ; the program (regardless of the setting of menuDesc.__NoHalt; see
  379. ; above).
  380. ; To get around this bug, you should always call another CMD.EXE 
  381. ; for executing CMD commands, e.g.
  382. ; instead of 
  383. ;
  384. ;    OnInit = 'dir'
  385. ;
  386. ; use
  387. ;
  388. ;    OnInit = 'cmd /c dir'
  389. ;
  390. ; and instead of
  391. ;
  392. ;    OnInit = 'dir & pause'
  393. ;
  394. ; use
  395. ;
  396. ;    OnInit = 'cmd /c "dir & pause"'
  397. ;
  398. ; Note that because of this bug the function #EXECUTECMD() always uses
  399. ;
  400. ;    'cmd /c' command
  401. ;
  402. ; to execute a command. It's also used for commands entered at the
  403. ; input line (like *dir).
  404. ;
  405. ;
  406. ; RxLBox commands
  407. ; ---------------
  408. ;
  409. ; The format for RxLBox commands is:
  410. ;
  411. ;   #commandName( commandOptions ) commandParameter
  412. ;
  413. ; 'commandName' is the name of the command, 'commandOptions' are 
  414. ; the options for the command and 'commandParameter' are the
  415. ; parameter for the command.
  416. ; The purpose of RxLBox commands is to use them in menu actions,
  417. ; key definitions and macros. But you can also enter them
  418. ; interactive on the input line.
  419. ;
  420. ; The following RxLBox commands are defined:
  421. ;
  422. ;   #SHOWHISTORY()
  423. ;   - show the current menu stack entries
  424. ;
  425. ;   #SHOWMENULIST()
  426. ;   - show a menu with all menus found in the menu description
  427. ;
  428. ;   #SHOWMACROLIST()
  429. ;   - show a menu with all macros defined in the menu description
  430. ;
  431. ;   #GOTOMENU() next_menu
  432. ;   - show the menu 'next_menu'. 'next_menu' must be the name of
  433. ;     another menu in the menu description.
  434. ;
  435. ;   #GOBACK() {n}
  436. ;   - go back n menu level
  437. ;     if n is greater than 0 this commands jumps back n level. If n
  438. ;     is greater than the number of nested menus called so far, this
  439. ;     command will end the program. Use -1 for n to go back to the
  440. ;     first menu called. Use -2 for n to go back one menu level only
  441. ;     if there are at least 2 menus on the stack; #GOBACK -2 never
  442. ;     ends the program.
  443. ;     Invalid values for n are treated as 1.
  444. ;
  445. ;   #EXECUTECMD() command
  446. ;   - execute the command 'command' using the default command
  447. ;     processor. Preceed the command with an asterix '*' to
  448. ;     wait after the execution of the command. 
  449. ;     Surround the command with '{' and '}' if it's a REXX statement
  450. ;     returning the command to execute. Example:
  451. ;
  452. ;       #EXECUTECMD() %comspec%
  453. ;
  454. ;         would pass the command "%comspec%" to the command processor
  455. ;         
  456. ;       #EXECUTECMD() { value( 'COMSPEC',,'OS2ENVIRONMENT' ) }
  457. ;
  458. ;         would pass the contents of the environment variable 'COMSPEC'
  459. ;         at runtime to the command processor.
  460. ;
  461. ;     Note: Use the option NOP (see below) to avoid the refresh of the
  462. ;           display after executing the command.
  463. ;           #EXECUTECMD() will always execute the command using
  464. ;           'cmd /c command' to avoid the CTRL-C bug in CMD.EXE.
  465. ;
  466. ;   #REXXCMD() statement
  467. ;   - execute the REXX statement 'statement'. 
  468. ;     You can read and change the exported REXX variables
  469. ;     (see above) in the REXX statement(s).
  470. ;     Note: Use the option NOP (see below) to avoid the refresh of the
  471. ;           display after executing the command.
  472. ;     IMPORTANT: DO NOT USE THE RETURN OR THE EXIT STATEMENT!
  473. ;
  474. ;   #NOP()
  475. ;   - do nothing
  476. ;
  477. ;   #QUIT()
  478. ;   - end the program and return an empty string
  479. ;
  480. ;   #SHOWHELP()
  481. ;   - show the help topic referenced in the menu key 'HelpForF1'
  482. ;
  483. ;   #SHOWLINEHELP()
  484. ;   - show the help topic referenced in the menu key 'HelpForAlt_F1'
  485. ;
  486. ;   #SHOWKEYHELP()
  487. ;   - show the help topic referenced in the menu key 'HelpForCtlr_F1'
  488. ;
  489. ;   #REFRESH()
  490. ;   - refresh the display
  491. ;
  492. ;   #REPEAT()
  493. ;   - repeat the last input line
  494. ;
  495. ;   #USERINPUT() environment_Variable {# checkStatement } {# errorMessage }
  496. ; or
  497. ;   #USERINPUT() menuDesc.REXX_Variable {# checkStatement } {# errorMessage }
  498.  
  499. ;   - save the user input in the environment variable 'environment_variable'.
  500. ;     or in the REXX variable 'MenuDesc.REXX_variable'.
  501. ;    'REXX_Variable' can be any string.
  502. ;     'checkStatement' can be a REXX statement that must evaluate to 1 if
  503. ;     RxLBox should save the user input in the variable.
  504. ;     Use the REXX variable 'EnvValue' in the 'checkStatement' to refer 
  505. ;     to the input of the user.
  506. ;     If checkStatement evaluates to a value not equal 1, RxLBox shows the
  507. ;     error message 'errorMessage' and ignores the user input.
  508. ;
  509. ;     To use REXX statements for 'environment_variable' and 'errorMessage'
  510. ;     enclose them with '{' and '}'. 'checkStatement' and 'errorMessage' 
  511. ;     are optional.
  512. ;
  513. ;     Note: This command supports multiple options (see below).
  514. ;
  515. ;     (see the menu 'InputVarMenu3' for an example)
  516. ;
  517. ; At this time there are only a few options possible (invalid options
  518. ; are ignored by RxLBox):
  519. ;
  520. ;
  521. ; - Options for the command #USERINPUT:
  522. ;
  523. ;   BLANK_OK
  524. ;     delete the environment or REXX variable if the users enter an 
  525. ;     empty string for a #USERINPUT command. By default RxLBox ignores 
  526. ;     empty user input for the #USERINPUT command.
  527. ;
  528. ;   UPPER
  529. ;     translate the user input to uppercase before saving it into the
  530. ;     environment variable. By default RxLBox won't change the
  531. ;     user input. Note that only the chars from a to z are translated!
  532. ;
  533. ;   #USERINPUT supports multiple options.
  534. ;
  535. ;
  536. ; - Options for the commands #REXXCMD and #EXECUTECMD:
  537. ;
  538. ;   GOBACK
  539. ;     go back one menu after executing the command
  540. ;
  541. ;   QUIT
  542. ;     exit the program returning an empty string after executing 
  543. ;     the command
  544. ;
  545. ;   PAUSE
  546. ;     wait for a key after executing the command and refresh the
  547. ;     screen after the user pressed a key
  548. ;
  549. ;   NOP
  550. ;     do not refresh the screen after executing the command
  551. ;
  552. ;   REFRESH
  553. ;     refresh the screen after executing the command
  554. ;
  555. ;   The commands #REXXCMD and #EXECUTECMD uses only one option
  556. ;   per command.
  557. ;
  558. ;   The options are processed in the order given above (e.g. if you use
  559. ;   the options 'QUIT NOP' for a #REXXCMD command, only the option 'QUIT'
  560. ;   is processed.) The default option for #REXXCMD and #EXECUTECMD is
  561. ;   REFRESH. This option is also used if only unknown options are found.
  562. ;
  563. ;
  564. ; The parameter for the commands depend on the type of the command.
  565. ;
  566. ;
  567. ; Hints & Trouble Shooting
  568. ; ========================
  569. ;
  570. ; - To suppress the internal menus you can redefine the function keys  
  571. ;   used to call these menus (F8, F11 and F12) with other commands,
  572. ;   with the command '#NOP', or with an empty string.
  573. ;   See the menus 'Menu2' and 'Menu3' for examples
  574. ;
  575. ; - Use REXX statements and environment variables to implement 
  576. ;   dynamic menus (see the menu 'Numbers' for an example).
  577. ;   Note that the status line and the title lines are refreshed after 
  578. ;   each command execution or function key. To refresh the other lines 
  579. ;   in the menu you must use the #REFRESH command.
  580. ;
  581. ; - Some times the ANSI driver get's confused if you're using a lot
  582. ;   of ANSI esc sequences. In this case the ANSI driver prints strings
  583. ;   like
  584. ;
  585. ;     'pppppppppppp' 
  586. ;
  587. ;   to the screen and the key definitions won't work any more.
  588. ;
  589. ;   The best solution for this problem: 
  590. ;
  591. ;   Close the OS/2 session and open a new one.
  592. ;
  593. ;   If you don't want to close the session you may try to reset the
  594. ;   ANSI driver with the commands:
  595. ;
  596. ;      ANSI OFF
  597. ;      ANSI ON
  598. ;
  599. ;   (This method may work or may not).
  600. ;
  601. ; - If you can't use the cursor keys to navigate on your PC try
  602. ;   using
  603. ;
  604. ;     OnInit = '@keys off'
  605. ;     OnExit = '@keys on'
  606. ;
  607. ;   for the first menu called. Or use
  608. ;
  609. ;     OnMainInit = '@keys off'
  610. ;     OnMainExit = '@keys on'
  611. ;
  612. ;   for the first menu called.
  613. ;
  614. ; --------------------------------------------------------------------
  615. [MACROLIST]
  616. ; This section contains the macros for the input line. To use a macro
  617. ; just enter it on the inputline of RxLBox.
  618. ;
  619. ; The format for the entries is
  620. ;
  621. ;   MacroName = MacroCommand
  622. ; 'MacroName' is the name of the macro and can be any string not
  623. ; beginning with '['. Each macro must have a unique name. The
  624. ; maximum length for 'MacroName' is 25; the length of the macro
  625. ; command is not limited.
  626. ; 'macroCommand' can be either a RxLBox command (beginning with
  627. ; a dash '#') or any legal OS/2 command.
  628. ;
  629. ; Preceed the command with an asterix '*' if RxLBox should wait for
  630. ; a keystroke after the execution.
  631. ;
  632. ; The number of macros defined is not limited.
  633. ; Macros are global for all menus.
  634. ;
  635. ; You can define more than one MACROLIST section in the file;
  636. ; the number of sections with macros is not limited.
  637. ;
  638. CMD1=*@C:\OS2\CMD.EXE /C ECHO. & ECHO. This is the CMD called via 'C:\OS2\CMD.EXE'
  639. CMD2=*@%comspec% /C ECHO. & ECHO. This is the CMD called via %%comspec%%
  640. CMD3=('*@' || value( 'COMSPEC',, 'OS2ENVIRONMENT' ) || " /C ECHO. & ECHO. This is the CMD called via value( 'COMSPEC',, 'OS2ENVIRONMENT' )")
  641. CMD4={ '*@%comspec% /C @ECHO. & ECHO. This macro was evaluated at ' || time()  || ' (just before the execution).' }
  642.  
  643. ;
  644. ; another additional MacroList
  645. [MACROLIST]
  646. MACROS=#SHOWMACROLIST
  647.  
  648. ; Macro MAIN: Delete the menu stack and goto the main menu
  649. Main=#GOBACK() -1
  650.  
  651. ; Macro Up:   Goback one menu level if there are at least 2 menus on the stack
  652. Up=#GOBACK() -2
  653.  
  654. ; You can use macros to override some of the internal RxLBox commands. The
  655. ; next line implements a macro called #QUIT:
  656. ; (uncomment the line to try it)
  657. ;
  658. ; #QUIT=*ECHO.& ECHO. This is the macro #QUIT!
  659.  
  660. [*DEFAULTMENU*]
  661. ESC = #GOBACK() -2
  662.  
  663. ; --------------------------------------------------------------------
  664. [*MainMenu*]
  665. ;
  666. ; --------------------------------------------------------------------
  667. ; This is the default menu displayed by RxLBox if called without a
  668. ; menu parameter.
  669. ; --------------------------------------------------------------------
  670. ;
  671. ; Note that this menu uses the program internal defaults for not
  672. ; defined values because there's no DEFAULTMENU before it in
  673. ; the menu desription file!
  674. ;
  675.  
  676. ; You can use the key OnMainInit to specify one or more REXX statements
  677. ; that RxLBox should execute before calling the first menu. Note that RxLBox
  678. ; only uses the key OnMainInit of the main menu!
  679. ; The main menu is the first menu found in the parameters (see
  680. ; RXLBOX.CMD for the usage description); the variable !curMenu
  681. ; contains the name of the current menu shown.
  682. ;
  683. ; Set the REXX variable !curRC to a value not equal '' in the REXX code
  684. ; for OnMainInit to suppress the menu. In this case RxLBox ends
  685. ; imediately and returns
  686. ;
  687. ;    'ERROR: 97 : ' !curRC
  688. ;
  689. ; to the calling program. RxLBox sets !curRC to '' before executing the
  690. ; REXX statements.
  691. ;
  692. OnMainInit =  \
  693.               nop; MenuDesc.__NoHalt = '1'; /* turn off CTRL-C */ ;  \
  694.               call ShowWorkingMessage 'Exec. OnMainInit, !MainMenu is' \
  695.                    !curMainMenu || ', !curMenu is ' || !curMenu || '. Press any key', 1 ; \
  696.               !curRC = '';
  697. ;         --> The maximum length for a message to show with ShowWorkingMessage
  698. ;             is 76. The message used above is longer than 76 so RxLBox
  699. ;             truncates it after 76 characters.
  700.  
  701. ; You can use the key OnMainExit to specify one or more REXX statements
  702. ; that RxLBox should execute before ending the program. Note that RxLBox
  703. ; only uses the key OnMainExit of the main menu!
  704. ; The main menu is the first menu found in the parameters (see
  705. ; RXLBOX.CMD for the usage description).
  706. ;
  707. ; Note further that the REXX variable !curRC has no meaning for this
  708. ; statement.
  709. ;
  710. OnMainExit = call ShowWorkingMessage 'Exec. OnMainExit, !MainMenu is' \
  711.                    !curMainMenu || ', !curMenu is ' || !curMenu || '. Press any key', 1,0 ;
  712.  
  713. ; You can use the key OnInit to specify one or more REXX statements
  714. ; that RxLBox should execute each time before calling a menu.
  715. ;
  716. ; Set the REXX variable !curRC to a value not equal '' in the REXX
  717. ; statements for OnInit to suppress the menu.
  718. ; In this case RxLBox will show the previous menu again (or end the
  719. ; program if this is the first menu). Note that RxLBox sets !curRC to
  720. ; '' before executing the OnInit statement.
  721. ;
  722. ; If you specify OnInit and OnMainInit for the first menu shown, RxLBox will
  723. ; execute both code in the order OnMainInit and than OnInit.
  724. ;
  725. ; Note: See the Menu PasswordMenu below for an example
  726. ;
  727. ;OnInit =  call ShowWorkingMessage 'Executing OnInit for the MainMenu. Press any key .......................................' ; \
  728. ;          call WaitForAKey  ;
  729. ;
  730. ; You can use the key OnExit to specify one or more REXX statements
  731. ; that RxLBox should execute each time after calling a menu.
  732. ;
  733. ; Set the REXX variable !curRC to a value not equal '' in the REXX
  734. ; statements for OnExit to prevent the leaving of this menu.
  735. ; In this case RxLBox will show the current menu again. Note that
  736. ; RxLBox sets !curRC to '' before executing the OnExit statement.
  737. ;
  738. ; If you specify OnExit and OnMainExit for the first menu shown, RxLBox will
  739. ; execute both code in the order OnMainInit and than OnInit.
  740. ;
  741. ; Note: See the Menu PasswordMenu below for an example
  742. ;
  743. ;OnExit =  call ShowWorkingMessage 'Executing OnExit for the MainMenu. Press any key' ; \
  744. ;          call WaitForAKey;
  745.  
  746. ; "Title1" is the title for the 2nd line of the menu (up to 74 chars)
  747. Title1             = This is the menu "MainMenu" (Use F7 to switch the CTRL-C checking)
  748.  
  749. ; "Title2" is the title for the 3nd line of the menu (up to 74 chars)
  750. Title2             = This menu uses the internal program default values
  751.  
  752. ; "Title3" is the title for the 5nd line of the menu (up to 74 chars)
  753. Title3             = This is a sample menu for RxLBox. \
  754.                      RxLBox is (c) 1998 Bernd Schemmer
  755.  
  756. ; "StatusLine" is the text for the status line (line 22) (up to 74 chars)
  757. ; shown for all menu entries without a value for StatusLine.# (see below).
  758. ;
  759. ; Note that the statusline is refreshed after every command!
  760. ; (cursor keys and function keys are also commands)
  761. ;
  762. ; Note: Use '7D'x for '{' inside REXX Statements.
  763. ;
  764. StatusLine         = {'Today is {' || date() || '7D'x || \
  765.                      '. Last statusline update was at ' || time() || '.'}
  766.  
  767. ; "InputPrompt" is the prompt text for the line 24 (up to 15 chars)
  768. InputPrompt        = Your choice:
  769.  
  770. ; "HelpPrompt" is the prompt to press a key to return from the online help
  771. ; (up to 74 chars)
  772. HelpPrompt         = Press any key to continue ...
  773.  
  774. ; "ErrorPrompt" is the prompt to press a key after a error occured
  775. ; (up to 74 chars)
  776. ErrorPrompt        = This is the default error prompt
  777.  
  778. ; "HelpStatusLine" is the status line for the online help (up to 74 chars)
  779. HelpStatusLine     = Online Help 
  780.  
  781. ; The following entries define the colors for the menu
  782. ;
  783. ; The format of the value for all color entries is:
  784. ;
  785. ;     {attr} fg on {attr} bg
  786. ;
  787. ;   'attr' can be one or more of:
  788. ;     Highlight Normal Blink Invers Invisible
  789. ;
  790. ;   'fg' and 'bg' can be one of:
  791. ;     Black Red Green Yellow Blue Magnenta Cyan White
  792. ;
  793. ; Note: Invalid strings in color values are ignored
  794. ;
  795.  
  796. ; This is the color for the menu frame and background
  797. FrameColor         = CYAN ON WHITE
  798.  
  799. ; This is the color for the menu items
  800. ItemColor          = CYAN ON WHITE
  801.  
  802. ; This is the color for the selected menu item
  803. SelectedItemColor  = HIGHLIGHT YELLOW ON BLUE
  804.  
  805. ; This is the color for the TITLE1
  806. Title1Color        = HIGHLIGHT YELLOW ON BLACK
  807.  
  808. ; This is the color for the TITLE2
  809. Title2Color        = HIGHLIGHT RED ON BLACK
  810.  
  811. ; This is the color for the TITLE3
  812. Title3Color        = HIGHLIGHT GREEN ON BLACK
  813.  
  814. ; This is the color for the status line
  815. StatusLineColor    = HIGHLIGHT YELLOW ON CYAN
  816.  
  817. ; This is the color for error messages
  818. ErrorTextColor     = HIGHLIGHT YELLOW ON RED
  819.  
  820. ; This is the color for the input line
  821. InputLineColor     = BLACK ON YELLOW
  822.  
  823. ; If this color value is set, RxLBox will clear the screen with the
  824. ; colors contained in this value at the program end.
  825. ; If the value of this key is empty, RxLBox does not clear the
  826. ; screen at program end.
  827. CLS                = WHITE ON BLACK
  828.  
  829. ; If the key AcceptAllInput is set to YES, RxLBox will return any
  830. ; unknown string entered by the user in this menu to the calling
  831. ; program. Any other value for this key suppresses unkown strings
  832. ; entered by the user.
  833. ; The default for this key is NO.
  834. ;
  835. ; Note: To enter a string beginning with one of the chars '#*{'
  836. ;       preceed the line with '^'; to enter a string beginning
  837. ;       with '^' use '^^'.
  838. ;
  839. AcceptAllInput     = NO
  840.  
  841. ; If the value for the key InputVar is not equal '', RxLBox will save
  842. ; any unknown string entered by the user in an environment variable with
  843. ; the value of this key as name.
  844. ; If you specify AcceptAllInput=YES and InputVar=envVarName for a menu,
  845. ; InputVar is used.
  846. ;
  847. ; Note: To enter a string beginning with one of the chars '#*{'
  848. ;       preceed the line with '^'; to enter a string beginning
  849. ;       with '^' use '^^'.
  850. ;       You can not use numbers to navigate in menus with InputVar
  851. ;       not equal ''.
  852. ;
  853. InputVar           = 
  854.  
  855. ; You can use the keys 'ESC', 'Fkey1' to 'Fkey12' to define a command for
  856. ; the function keys ESC, and F1 to F12. The command must be a legal OS/2 
  857. ; command or a legal RxLBox Command. RxLBox commands must begin with a 
  858. ; dash '#'.
  859. ; (See above for the defined RxLBox commands). To simulate user input
  860. ; with a function key, preceed the string with a tilde '~' (see the
  861. ; menu InputVarMenu3 for some examples)
  862. ;
  863. ; Preceed OS/2 commands with an asterix '*' if RxLBox should wait for
  864. ; a keystroke after the execution.
  865. ; Note that some function keys have predefined functions. To suppress
  866. ; the predefined functions you can either define another command for
  867. ; the key or you may define an empty string for the key.
  868. ;
  869.  
  870. ; default function: go back one menu level 
  871. ;
  872. ; ESC = { '#GOTOMENU()' !curMainMenu }
  873. ;
  874. ; prohibit leaving the menu with ESC by re-defining ESC to #NOP()
  875. ; ESC = #NOP()
  876.  
  877. ; suppress leaving the program with ESC
  878. ; ESC = #GOBACK() -2
  879.  
  880. ; default function: show the online help
  881. ; Fkey1=
  882.  
  883. ; define a RxLBox command for F2
  884. Fkey2=#SHOWMACROLIST()
  885.  
  886. ; default function: repeat last command
  887. ; FKey3=
  888.  
  889. ; define an OS/2 command for F4
  890. Fkey4=cmd /K "ECHO. & ECHO. Opened an OS/2 Shell. Enter EXIT to return to RxLBox ..."
  891.  
  892. ; define another OS/2 command for F5
  893. Fkey5={'*dir'}
  894.  
  895. FKey6= #GOTOMENU() RexxCmdMenu
  896.  
  897. Fkey7= #REXXCMD() \
  898.         if menudesc.__NoHalt <> '' then ; \
  899.         do ; \
  900.           menuDesc.__NoHalt = '' ; \
  901.           call ShowWorkingMessage 'CTRL-BREAK checking is now active. Press any key' ,1,0 ; \
  902.         end ; \
  903.         else ; \
  904.         do ; \
  905.           menuDesc.__NoHalt = 1 ; \
  906.           call ShowWorkingMessage 'CTRL-BREAK checking is now inactive. Press any key' ,1,0 ; \
  907.         end ; \
  908.         nop
  909.  
  910. ; def.: show Menu with all defined macros
  911. ; Fkey8=
  912.  
  913. ; def.: refresh the screen
  914. ; Fkey9=
  915.  
  916. ; def.: end program
  917. ; Fkey10=
  918.  
  919. ; def.: Show list of menus
  920. ; Fkey11=
  921.  
  922. ; def.: Show history of called menus
  923. ; Fkey12=
  924.  
  925. ; This is the help topic called by the command #SHOWONLINEHELP
  926. HelpForF1          = { translate( 'MAIN' ) || 'HELP' }
  927.  
  928. ; This is the help topic called by the command #SHOWKEYHELP
  929. HelpForCTRL_F1     = MAIN_KEYHELP
  930.  
  931. ; This is the help topic called by the command #SHOWLINEHELP
  932. HelpForALT_F1      = INPUTLINEHELP
  933.  
  934. ; The following entries contain the menu items.
  935. ; The format for menu items is:
  936. ;
  937. ;   MenuItem.# = menu_text
  938. ;   Action.# = menu_action
  939. ;   StatusLine.# = menu_entry_statusline
  940. ;
  941. ;   # can be a whole number greater than 0, or the dash '#'.
  942. ;   The dash means: Use the next free number.
  943. ;   The number of menu items is not limited. The order of the
  944. ;   entries is meaningless (except for menu entries defined
  945. ;   with a '#' instead of a number).
  946. ;
  947. ;   You can not define a menu entry more than one time.
  948. ;            
  949. ;   'Menu_text' is the menu description for the menu. 
  950. ;   'Menu_text' can be any string with up to 74-(n+3) chars.
  951. ;
  952. ;   n is the number of digits needed for the menu entry numbers.
  953. ;   Example: In a menu with up to 99 entries, the maximum length
  954. ;            for a 'Menu_text' is 69; in a menu with up to 999 
  955. ;            entries the maximum length is 68; and so on.
  956. ;
  957. ;   'Menu_action' can be any string. This is either a command for
  958. ;   RxLBox or the string returned to the calling program.
  959. ;
  960. ;   If 'Menu_action' begins with a dash '#', RxLBox treats it
  961. ;   as RxLBox command. RxLBox commands are interpreted by RxLBox
  962. ;   and never returned to the calling program.
  963. ;
  964. ;   'menu_entry_statusline' is the status line shown if this entry
  965. ;   is the highlighted entry. This entry is optional. The default
  966. ;   status line for all entries is the status line defined with
  967. ;   the key 'StatusLine'.
  968. ;
  969. ;   The number of entries for a menu is not limited.
  970. ;
  971. ;   See above for the defined RxLBox commands.
  972. ;
  973. MenuItem.#         = Call the menu with sample OS/2 commands
  974. Action.#           = #GOTOMENU() OS2CmdMenu
  975. StatusLine.#       = This is the statusline for the menu entry 1
  976.  
  977. MenuItem.#         = Call the menu with sample REXX commands
  978. Action.#           = #GOTOMENU() REXXCmdMenu
  979. StatusLine.#       = { 'This is the statusline for the menu entry 2, the time is ' time() }
  980.  
  981. MenuItem.#         = Enter some REXX commands in TRACE mode
  982. StatusLine.#       = { 'This is the statusline for the menu entry 3, the date is ' date() }
  983. Action.#           = #RexxCmd() \
  984.                      'cls' ; \
  985.                      say ; \
  986.                      say '--- Sample trace mode --- ' ; \
  987.                      say '' ; \
  988.                      say 'Available REXX variables: ' ; \
  989.                      say ; \
  990.                      say '  !curMenu !curMenuAction !curMenuEntry !curCmd' ; \
  991.                      say '  !curPageno !totalPageCount !curLineNo !curEntryNo !totalEntryCount'; \
  992.                      say 'and the stem '; \
  993.                      say '  MenuDesc. ' ; \
  994.                      say ; \
  995.                      say 'The current values of the REXX variables are:' ; \
  996.                      say '  !curMainMenu is "' || !curMainMenu || '"' ; \
  997.                      say '  !curMenu is "' || !curMenu || '"' ; \
  998.                      say '  !curMenuAction is "' || !curMenuAction || '"' ; \
  999.                      say '  !curMenuEntry is "' || !curMenuEntry || '"' ; \
  1000.                      say '  !curMenuEntry1 is "' || !curMenuEntry1 || '"' ; \
  1001.                      say '  !curCmd is "' || !curCmd || '"' ; \
  1002.                      say '  !curPageNo is "' || !curPageNo || '",' \
  1003.                          '!curLineNo is "' || !curLineNo || '",'  \
  1004.                          '!curEntryNo is "' || !curEntryNo || '"' ; \
  1005.                      say '  !totalEntryCount is "' || !totalEntryCount || '", '  \
  1006.                          '!totalPageCount is "' || !totalPageCount || '"' ; \
  1007.                      say '' ; \
  1008.                      say 'Enter a REXX statement or use <RETURN> to return to the menu ...' ; \
  1009.                      say '' ; \
  1010.                      trace ?a; nop
  1011.  
  1012. MenuItem.#         = Try \
  1013.                      the \
  1014.                      included \
  1015.                      REXX \
  1016.                      program ^\
  1017. ;                    -->  Use the backslash as continuation char to split an
  1018. ;                         entry over several lines.
  1019. ;                         Note: Use ^\ to use \ as normal char at the
  1020. ;                               end of a line!
  1021.  
  1022. Action.#           = #RexxCmd() \
  1023.                      'cls' ; \
  1024.                      say '' ; \
  1025.                      do i = 1 to 20; \
  1026.                        say center( 'This is imbedded REXX code!', 80 ); \
  1027.                      end; \
  1028.                      say '' ; \
  1029.                      say center( 'Press any key to return to the menu', 80 ) ; \
  1030.                      call WaitForAKey ;
  1031. ;                    -->  This is an imbedded REXX program on multiple
  1032. ;                         lines. Note that you must (!) use a semicolon
  1033. ;                         after every REXX statement in imbedded REXX
  1034. ;                         programs!
  1035. ;
  1036.  
  1037. MenuItem.#         = ---------------------------------------------------------------------------
  1038. Action.#           = #NOP
  1039.  
  1040. MenuItem.#         = Call the sample menu using OnMenuInit to implement a password
  1041. Action.#           = #GOTOMENU() PassWordMenu
  1042.  
  1043. MenuItem.#         = ---------------------------------------------------------------------------
  1044. Action.#           = #NOP
  1045.  
  1046. MenuItem.#         = call a random menu
  1047. Action.#           = { "#GOTOMENU()"  "Menu" || random( 1,5 ) }
  1048. ;                    -> This is a REXX statement that evaluates to an
  1049. ;                       RxLBox command.
  1050. ;                       RxLBox evaluates this statement every time the
  1051. ;                       user chooses this entry
  1052.  
  1053. MenuItem.#         = Call Menu2
  1054. Action.#           = {"#Goto" || "Menu()" "Menu" || 1+1 }
  1055. ;                    -> This is a REXX statement that evaluates to an
  1056. ;                       RxLBox command.
  1057. ;                       RxLBox evaluates this statement every time the
  1058. ;                       user chooses this entry
  1059.  
  1060. MenuItem.#         = Call Menu3
  1061. Action.#           = ("#Goto" || "Menu()" "Menu" || 1+2)
  1062. ;                    -> This is a REXX statement that evaluates to an
  1063. ;                       RxLBox command.
  1064. ;                       RxLBox evaluates this statement _only_once_ at
  1065. ;                       startup time
  1066.  
  1067. MenuItem.#         = Call Menu4 (new defined FKeys)
  1068. Action.#           = #GotoMenu() menu4
  1069.  
  1070.  
  1071. MenuItem.#         = Call Menu5 (gives an error 'cause it's not there!)
  1072. Action.#           = #GotoMenu() menu5
  1073.  
  1074. MenuItem.#         = Call Menu6 (gives an error 'cause it's an empty menu)
  1075. Action.#           = #GotoMenu() menu6
  1076.  
  1077. MenuItem.#         = Call Menu7 (This is a long menu)
  1078. Action.#           = #GotoMenu() menu7
  1079.  
  1080. MenuItem.#         = Call This is a [menu] with a long section name
  1081. Action.#           = #Gotomenu() This is a [menu] with a long section name
  1082.  
  1083. MenuItem.#         = ------ Use the routine ShowWorkingmessage in a menu -----------------------
  1084. Action.#           = #NOP
  1085.  
  1086. MenuItem.#         = call ShowWorkingMessage
  1087. Action.#           = #REXXCMD( PAUSE ) call ShowWorkingMessage 'You can call ShowWorkingMessage in a menu!',,0
  1088.  
  1089. MenuItem.#         = ----- The next menus show how to use environment variables ----------------
  1090. Action.#           = #NOP
  1091.  
  1092. MenuItem.#         = { 'Call Number menu (current number is ' || value( 'number',, 'OS2ENVIRONMENT' ) || ')' }
  1093. Action.#           = #GotoMenu() Number
  1094.  
  1095. MenuItem.#         = { 'Call the InputVar menu1 (UserInput1 is "' || value( 'UserInput1',, 'OS2ENVIRONMENT' ) || '")' }
  1096. Action.#           = #GotoMenu() InputVarMenu1
  1097.  
  1098. MenuItem.#         = { 'Call the InputVar menu2 (UserInput2 is "' || value( 'UserInput2',, 'OS2ENVIRONMENT' ) || '")'}
  1099. Action.#           = #GotoMenu() InputVarMenu2
  1100.  
  1101. MenuItem.#         = { 'Call the InputVar menu3 (UserInput3 is "' || value( 'UserInput3',, 'OS2ENVIRONMENT' ) || '")'}
  1102. Action.#           = #GotoMenu() InputVarMenu3
  1103.  
  1104. MenuItem.#         = ----- The next three menus are the internal menus -------------------------
  1105. Action.#           = #NOP
  1106.  
  1107. MenuItem.#         = Show the history list
  1108. Action.#           = #SHOWHISTORY()
  1109.  
  1110. MenuItem.#         = Show the list of all menus defined
  1111. Action.#           = #SHOWMENULIST()
  1112.  
  1113. MenuItem.#         = Show the list of all macros defined
  1114. Action.#           = #SHOWMACROLIST()
  1115.  
  1116. MenuItem.#         = ------ The next entries are for leaving the program -----------------------
  1117. Action.#           = #NOP
  1118.  
  1119. MenuItem.#         = Return 'OK' to the calling program
  1120. Action.#           = OK
  1121.  
  1122. MenuItem.#         = GoBack (leave the program, if this is the top level)
  1123. Action.#           = #Goback()
  1124.  
  1125. MenuItem.#         = Quit (leave the program, return "" to the calling program)
  1126. Action.#           = #Quit()
  1127.  
  1128. MenuItem.#         = Return "OK, I'm done" to the calling program
  1129. Action.#           = OK, I'm done
  1130.  
  1131. MenuItem.#         = Return the number 123 to the calling program
  1132. Action.#           = 123
  1133.  
  1134. MenuItem.#         = Return "#GOBACK" to the calling program
  1135. Action.#           = ^#GOBACK
  1136. ;                    -> You must use the leading '^' if you want
  1137. ;                       to return a string beginning with one of the
  1138. ;                       chars '*#{'.
  1139.  
  1140. MenuItem.#         = Return "*CMD" to the calling program
  1141. Action.#           = ^*CMD
  1142. ;                    -> You must use the leading '^' if you want
  1143. ;                       to return a string beginning with one of the
  1144. ;                       chars '*#{'.
  1145.  
  1146. ; --------------------------------------------------------------------
  1147. ; The menu DEFAULTMENU contains the default values for all following
  1148. ; menus. Menus prior to the first DEFAULTMENU use the program internal
  1149. ; default values for their data.
  1150. ; --------------------------------------------------------------------
  1151.  
  1152. [*DefaultMenu*]
  1153. Title1             = This is the default title1
  1154. Title2             = This is the default title2
  1155. Title3             = This is the default title3
  1156. StatusLine         = This is the default status line
  1157. InputPrompt        = Input:
  1158. ErrorPrompt        = Press any key to continue
  1159. HelpPrompt         = Press any key to continue the program
  1160. FrameColor         = YELLOW ON BLUE
  1161. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1162. SelectedItemColor  = HIGHLIGHT YELLOW ON BLUE
  1163. Title1Color        = HIGHLIGHT YELLOW ON BLACK
  1164. Title2Color        = HIGHLIGHT RED ON BLACK
  1165. Title3Color        = HIGHLIGHT GREEN ON BLACK
  1166. StatusLineColor    = HIGHLIGHT BLUE ON WHITE
  1167. ErrorTextColor     = RED ON GREEN
  1168. InputLineColor     = BLACK ON YELLOW
  1169. CLS                = WHITE ON BLACK
  1170. AcceptAllInput     = NO
  1171. HelpForF1          = DefaultHelp
  1172. HelpForCTRL_F1     = KeyHelp
  1173. HelpForALT_F1      = InputLineHelp
  1174.  
  1175. ; --------------------------------------------------------------------
  1176.  
  1177. [*This is a [menu] with a long section name*]
  1178.  
  1179.  
  1180. ; Note that this menu and all following menus, up to the next DEFAULTMENU,
  1181. ; use the default values from the previous DEFAULTMENU!
  1182. ;
  1183. Title1             = This is the menu "This is a menu with a long section name"
  1184. Title2             = This menu uses only "automatic" menu numeration
  1185.  
  1186. HelpForF1          = This is a menu with a long section name
  1187.  
  1188. MenuItem.#         = This is a menu item with a very long action string
  1189. Action.#           = --------------------------------------------1---------------------------------------------
  1190.  
  1191. MenuItem.#         = This is a menu item with an empty action
  1192. Action.#           =
  1193.  
  1194. MenuItem.#         = Return to the calling menu
  1195. Action.#           = #Goback()
  1196.  
  1197.  
  1198. ; --------------------------------------------------------------------
  1199. [*This is a hidden menu*]
  1200. ;
  1201. Title1             = This is a hidden menu ('cause it's not referenced in any other menu)
  1202. Title2             = The only method to call it is the command #SHOWMENULIST
  1203. Title3             = {'The name of this menu is "' || !curMenu || '"'}
  1204. HelpForF1          =
  1205.  
  1206. MenuItem.#         = Leave the menu
  1207. Action.#           = #GOBACK()
  1208.  
  1209. ; --------------------------------------------------------------------
  1210. ; This is a menu with sample OS/2 commands
  1211. ;
  1212. [*OS2CmdMenu*]
  1213. ; You can use the key OnMainInit to specify one or more REXX statements
  1214. ; RxLBox should execute before calling the first menu. Note that RxLBox
  1215. ; only uses the key OnMainInit of the _first_ menu called!
  1216. ;
  1217. ; Note: You must call RxLBox with
  1218. ;
  1219. ;         RxLBox /I:RxLBox.men /M:OS2CmdMenu
  1220. ;
  1221. ;       to force RxLBox to execute this entry at program start!
  1222. ;
  1223. OnMainInit =  call ShowWorkingMessage 'Executing OnMainInit for the OS2CmdMenu.', \
  1224.                    ' Press any key' ; \
  1225.               call WaitForAKey;
  1226.  
  1227. ; You can use the key OnMainExit to specify one or more REXX statements
  1228. ; RxLBox should execute before ending the program. Note that RxLBox only
  1229. ; uses the key OnMainExit of the _first_ menu called!
  1230. ;
  1231. ; Note: You must call RxLBox with
  1232. ;
  1233. ;         RxLBox /I:RxLBox.men /M:OS2CmdMenu
  1234. ;
  1235. ;       to force RxLBox to execute _this_ entry at program end!
  1236. ;
  1237. OnMainExit =  call ShowWorkingMessage 'Executing OnMainExit for the OS2CmdMenu.', \
  1238.                    'Press any key' ; \
  1239.               call WaitForAKey;
  1240.  
  1241. Title1             = This is a menu with OS/2 commands
  1242. Title2             =
  1243. Title3             = {'The name of this menu is "' || !curMenu || '"'}
  1244.  
  1245. HelpForF1          =
  1246.  
  1247. MenuItem.#         = Exceute a DIR and wait for a key
  1248. Action.#           = #EXECUTECMD() { '*DIR' directory('\') }
  1249.  
  1250. MenuItem.#         = Call TEDIT without waiting for a key
  1251. Action.#           = #EXECUTECMD() TEDIT
  1252.  
  1253. MenuItem.#         = Call the CMD via C:\OS2\CMD.EXE
  1254. Action.#           = #EXECUTECMD() *@C:\OS2\CMD.EXE /C ECHO. & ECHO. This is the CMD called via 'C:\OS2\CMD.EXE'
  1255.  
  1256. MenuItem.#         = Call The CMD via %comspec% variable
  1257. Action.#           = #EXECUTECMD() *@%comspec% /C ECHO. & ECHO. This is the CMD called via %%comspec%%
  1258.  
  1259. MenuItem.#         = Call the CMD via "value( 'COMSPEC',, 'OS2ENVIRONMENT' )"
  1260. Action.#           = #EXECUTECMD() {'*@' || value( 'COMSPEC',, 'OS2ENVIRONMENT' ) || " /C ECHO. & ECHO. This is the CMD called via value( 'COMSPEC',, 'OS2ENVIRONMENT' )"}
  1261.  
  1262. MenuItem.#         = Call MainMenu
  1263. Action.#           = #GotoMenu() MainMenu
  1264.  
  1265. ; --------------------------------------------------------------------
  1266. ; This is a menu with sample REXX commands
  1267. ;
  1268. [*REXXCmdMenu*]
  1269. Title1             = This is a menu with REXX commands
  1270. Title2             =
  1271. Title3             = {'The name of this menu is "' || !curMenu || '"'}
  1272.  
  1273. HelpForF1          =
  1274.  
  1275. MenuItem.#         = Enter some REXX commands in TRACE mode
  1276. Action.#           = #RexxCmd() \
  1277.                      'cls' ; \
  1278.                      say '1B'x || '[1;36;44;m' ; \
  1279.                      say ; \
  1280.                      say '--- Sample trace mode --- ' ; \
  1281.                      say '' ; \
  1282.                      say 'Available REXX variables: ' ; \
  1283.                      say ; \
  1284.                      say '  !curMenu !curMenuAction !curMenuEntry !curCmd' ; \
  1285.                      say '  !curPageno !totalPageCount !curLineNo !curEntryNo !totalEntryCount'; \
  1286.                      say 'and the stem '; \
  1287.                      say '  MenuDesc. ' ; \
  1288.                      say ; \
  1289.                      say 'The current values of the REXX variables are:' ; \
  1290.                      say '  !curMainMenu is "' || !curMainMenu || '"' ; \
  1291.                      say '  !curMenu is "' || !curMenu || '"' ; \
  1292.                      say '  !curMenuAction is "' || !curMenuAction || '"' ; \
  1293.                      say '  !curMenuEntry is "' || !curMenuEntry || '"' ; \
  1294.                      say '  !curMenuEntry1 is "' || !curMenuEntry1 || '"' ; \
  1295.                      say '  !curCmd is "' || !curCmd || '"' ; \
  1296.                      say '  !curPageNo is "' || !curPageNo || '",' \
  1297.                          '!curLineNo is "' || !curLineNo || '",'  \
  1298.                          '!curEntryNo is "' || !curEntryNo || '"' ; \
  1299.                      say '  !totalEntryCount is "' || !totalEntryCount || '", '  \
  1300.                          '!totalPageCount is "' || !totalPageCount || '"' ; \
  1301.                      say '' ; \
  1302.                      say 'Enter a REXX statement or use <RETURN> to return to the menu ...' ; \
  1303.                      say '' ; \
  1304.                      trace ?a; nop
  1305.  
  1306. MenuItem.#         = Return time and date the entry was choosen
  1307. Action.#           = {"Menu entry choosen on "date()" at "time()"."}
  1308. ;                    --> This value is evaluated when the users chooses
  1309. ;                        the menu entry
  1310.  
  1311. MenuItem.#         = Return time and date the menu was read
  1312. Action.#           = ("Menu desc was read on "date()" at "time()".")
  1313. ;                    --> This value is evaluated when reading the menu
  1314. ;                    description file
  1315.  
  1316. ; --------------------------------------------------------------------
  1317.  
  1318. [*Menu2*]
  1319. Title1             = This is the menu "Menu2"
  1320. Title2             = This menu accepts all user input
  1321. Title3             = Use {rexxstatement} to return the result of a REXX statement
  1322. AcceptAllInput     = YES
  1323.  
  1324. HelpForF1          = Menu2_Help
  1325.  
  1326. MenuItem.#         = Call MainMenu
  1327. Action.#           = #GotoMenu() MainMenu
  1328. MenuItem.#         = Call Menu3
  1329. Action.#           = #GotoMenu() Menu3
  1330. MenuItem.5         = Call Menu5
  1331. Action.5           = #GotoMenu() menu5
  1332. MenuItem.6         = GoBack 3 level
  1333. Action.6           = #Goback() 3
  1334. MenuItem.7         = GoBack to the first menu called
  1335. Action.7           = #GoBack() -1
  1336.  
  1337. [*Menu3*]
  1338. Title1             = This is the menu "Menu3"
  1339. Title2             = This menu has some empty entries and supresses the internal menus
  1340. Title3             = Use <F7> to show the macro list
  1341. HelpForF1          = Menu3_Help
  1342.  
  1343. ; goback to the main menu
  1344. ; ESC = { '#GOTOMENU' !curMainMenu }
  1345. ESC = #GOBACK() -1
  1346.  
  1347. ; suppress the macro list
  1348. Fkey8=
  1349.  
  1350. ; suppress the list of menus (another method)
  1351. Fkey11= #NOP()
  1352.  
  1353. ; suppress the history of called menus
  1354. Fkey12= #NOP()
  1355.  
  1356. ; redefene the key F7
  1357. Fkey7 = #SHOWMACROLIST()
  1358.  
  1359. MenuItem.#         = Call MainMenu
  1360. Action.#           = #GotoMenu() MainMenu
  1361. MenuItem.#         = Call Menu2
  1362. Action.#           = #GotoMenu() Menu2
  1363. MenuItem.5         = Call Menu5
  1364. Action.5           = #GotoMenu() menu5
  1365. MenuItem.6         = GoBack
  1366. Action.6           = #Goback()
  1367.  
  1368. ; --------------------------------------------------------------------
  1369. [*Menu4*]
  1370. Title1             = This is the menu "Menu4"
  1371. Title2             = This menus shows the meaningless of the entry order
  1372. Title3             = All FKeys ared redefined in this menu (F2 is invalid)
  1373. HelpForF1          = Menu4_Help
  1374. HelpForCTRL_F1     = Menu4_CtrlHelp
  1375.  
  1376. FKey1=*ECHO. & ECHO. This is Fkey 1
  1377.  
  1378. FKey2=*ERROR This is Fkey 2
  1379.  
  1380. ; def.: repeat last command
  1381. FKey3=*ECHO. & ECHO. This is Fkey 3
  1382.  
  1383. Fkey4=*ECHO. & ECHO. This is Fkey 4
  1384.  
  1385. Fkey5=*ECHO. & ECHO. This is Fkey 5
  1386.  
  1387. Fkey6=*ECHO. & ECHO. This is Fkey 6
  1388.  
  1389. Fkey7=*ECHO. & ECHO. This is Fkey 7
  1390.  
  1391. ; def.: show the macro list
  1392. Fkey8=*ECHO. & ECHO. This is Fkey 8
  1393.  
  1394. ; def.: refresh screen
  1395. Fkey9=*ECHO. & ECHO. This is Fkey 9
  1396.  
  1397. ; default function: end the program
  1398. Fkey10=*ECHO. & ECHO. This is Fkey 10
  1399.  
  1400. ; def.: Show list of menus
  1401. Fkey11=*ECHO. & ECHO. This is Fkey 11
  1402.  
  1403. ; def.: Show history of called menus
  1404. Fkey12=*ECHO. & ECHO. This is Fkey 12
  1405.  
  1406. MenuItem.5         = Entry 5: Goto MainMenu
  1407. Action.5           = #GotoMenu() MainMenu
  1408. MenuItem.3         = Entry 3: Goto Menu3
  1409. Action.3           = #GotoMenu() Menu3
  1410. MenuItem.4         = Entry 4: Goto Menu2
  1411. Action.4           = #GotoMenu() menu2
  1412. MenuItem.1         = Entry 1: Goto Menu5
  1413. Action.1           = #GotoMenu() menu5
  1414. MenuItem.2         = Entry 2: GoBack
  1415. Action.2           = #Goback()
  1416.  
  1417. ; --------------------------------------------------------------------
  1418. [*Menu6*]
  1419. Title1             = This is the menu "Menu6"
  1420. Title2             = This is an empty menu
  1421.  
  1422. ; --------------------------------------------------------------------
  1423. [DummySection]
  1424. Comment            = This is a section ignored by RxLBox
  1425.  
  1426. ; --------------------------------------------------------------------
  1427. ; This is the DEFAULTMENU for all following menus!
  1428. ; Note for all entries not defined in this DEFAULTMENU the values from
  1429. ; the previous DEFAULTMENU are used.
  1430. ; --------------------------------------------------------------------
  1431.  
  1432. [*DefaultMenu*]
  1433. Title1             = This is the 2nd default title1
  1434. Title2             = This is the 2nd default title2
  1435. Title3             = This is the 2nd default title3
  1436. StatusLine         = This is the 2nd default status line
  1437. InputPrompt        = Your Choice:
  1438. ErrorPrompt        = Press any key to continue
  1439. HelpPrompt         = Press any key to continue the program
  1440. FrameColor         = YELLOW ON RED
  1441. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1442. SelectedItemColor  = HIGHLIGHT GREEN ON MAGNENTA
  1443. HelpForAlt_F1      =
  1444.  
  1445. ; --------------------------------------------------------------------
  1446.  
  1447. [*Number*]
  1448. Title1             = This is the menu "Number"
  1449. Title2             = This is an example for dynamic menus
  1450. Title3             = The number in the 1st entry is randomly set when the menu is called
  1451. StatusLine         = { 'Current number is ' || value( 'number',, 'OS2ENVIRONMENT' ) || ', use ESC to leave' }
  1452. HelpForF1          = 
  1453.  
  1454. ; set the environment variable random with a random number on menu init
  1455. OnInit             = call value 'random', random(), 'OS2ENVIRONMENT'
  1456.  
  1457. ; delete the environment variable random at menu exit
  1458. OnExit             = call value 'random', '' , 'OS2ENVIRONMENT'
  1459.  
  1460. MenuItem.#         = { 'Set the number to' value( 'random',, 'OS2ENVIRONMENT') '(This is a random number!)' }
  1461. Action.#           = #RexxCMD( NOP ) call value 'number', value( 'random',, 'OS2ENVIRONMENT'), 'OS2ENVIRONMENT'
  1462.  
  1463. MenuItem.#         = Set the number to 1234
  1464. Action.#           = #REXXCmd( NOP ) call value 'number', '1234', 'OS2ENVIRONMENT'
  1465.  
  1466. MenuItem.#         = Set the number to 2345 and return
  1467. Action.#           = #REXXCmd( GOBACK ) call value 'number', '2345', 'OS2ENVIRONMENT'
  1468.  
  1469. MenuItem.#         = Set the number to 3456 and return
  1470. Action.#           = #REXXCmd( GOBACK ) call value 'number', '3456', 'OS2ENVIRONMENT' 
  1471.  
  1472. MenuItem.#         = Set the number to 4567
  1473. Action.#           = #REXXCmd( NOP ) call value 'number', '4567', 'OS2ENVIRONMENT'
  1474.  
  1475. MenuItem.#         = Set the number to 5678
  1476. Action.#           = #REXXCmd( NOP ) call value 'number', '5678', 'OS2ENVIRONMENT'
  1477.  
  1478. MenuItem.#         = Set the number to 6789
  1479. Action.#           = #REXXCmd( NOP ) call value 'number', '6789', 'OS2ENVIRONMENT'
  1480.  
  1481.  
  1482. ; --------------------------------------------------------------------
  1483. [*InputVarMenu1*]
  1484. Title1             = This is a menu using the keyword "InputVar"
  1485. Title2             = You can use this type of menu for user input.
  1486. Title3             = In this menu the environment variable "UserInput1" is used.
  1487. StatusLine         = {'The current value of "UserInput1" is "' || value( 'UserInput1',, 'OS2ENVIRONMENT' ) || '"'}
  1488. InputPrompt        = Enter the value
  1489. ErrorPrompt        = Press any key to continue
  1490. HelpPrompt         = Press any key to continue the program
  1491. FrameColor         = YELLOW ON BLACK
  1492. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1493. SelectedItemColor  = HIGHLIGHT GREEN ON MAGNENTA
  1494. ErrorTextColor     = RED ON GREEN
  1495. HelpForAlt_F1      =
  1496. InputVar           = UserInput1
  1497.  
  1498. ; there must be at least on menu entry in every menu!
  1499. ;
  1500. MenuItem.#         = Accept the current value and leave the menu
  1501. Action.#           = #GoBack()
  1502.  
  1503. MenuItem.#         = ---------------------------------------------------------------------------
  1504. Action.#           = #NOP
  1505.  
  1506. MenuItem.#         = Note: Enclose the value with { and } to enter a REXX command;
  1507. Action.#           = #NOP
  1508.  
  1509. MenuItem.#         =       Preceed the value with '^' to enter a string with
  1510. Action.#           = #NOP
  1511.  
  1512. MenuItem.#         =       one of the chars '{', '*', or '#' as first character.
  1513. Action.#           = #NOP
  1514.  
  1515. ; --------------------------------------------------------------------
  1516. [*InputVarMenu2*]
  1517. Title1             = This is a menu using the keyword "InputVar"
  1518. Title2             = You can use this type of menu for user input.
  1519. Title3             = In this menu the environment variable "UserInput2" is used.
  1520. StatusLine         = {'The current value of "UserInput2" is "' || value( 'UserInput2',, 'OS2ENVIRONMENT' ) || '"'}
  1521. InputPrompt        = Enter the value
  1522. ErrorPrompt        = Press any key to continue
  1523. HelpPrompt         = Press any key to continue the program
  1524. FrameColor         = YELLOW ON BLACK
  1525. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1526. SelectedItemColor  = HIGHLIGHT GREEN ON MAGNENTA
  1527. ErrorTextColor     = RED ON GREEN
  1528. HelpForAlt_F1      =
  1529. InputVar           = UserInput2
  1530.  
  1531. ; there must be at least on menu entry in every menu!
  1532. ;
  1533. MenuItem.#         = Accept the current value and leave the menu
  1534. Action.#           = #GoBack()
  1535.  
  1536. MenuItem.#         = ---------------------------------------------------------------------------
  1537. Action.#           = #NOP
  1538.  
  1539. MenuItem.#         = Set the variable UserInput2 to "1234"
  1540. Action.#           = #REXXCMD( NOP ) call value 'UserInput2', '1234', 'OS2ENVIRONMENT'
  1541.  
  1542. MenuItem.#         = Set the variable UserInput2 to "4567" and leave the menu
  1543. Action.#           = #REXXCMD( GOBACK ) call value 'UserInput2', '4567', 'OS2ENVIRONMENT'
  1544.  
  1545. MenuItem.#         = Set the variable UserInput2 to "789A" and leave the program
  1546. Action.#           = #REXXCMD( QUIT ) call value 'UserInput2', '789A', 'OS2ENVIRONMENT'
  1547.  
  1548. MenuItem.#         = ---------------------------------------------------------------------------
  1549. Action.#           = #NOP
  1550.  
  1551. MenuItem.#         = Note: Enclose the value with { and } to enter a REXX command;
  1552. Action.#           = #NOP
  1553.  
  1554. MenuItem.#         =       Preceed the value with '^' to enter a string with
  1555. Action.#           = #NOP
  1556.  
  1557. MenuItem.#         =       one of the chars '{', '*', or '#' as first character.
  1558. Action.#           = #NOP
  1559.  
  1560.  
  1561. ; --------------------------------------------------------------------
  1562. [*InputVarMenu3*]
  1563. Title1             = This is a menu using the keyword "InputVar" and the command "#UserInput"
  1564. Title2             = You can use this type of menu for user input.
  1565. Title3             = Press ESC to leave the menu
  1566. StatusLine         = {'The current value of "UserInput3" is "' || value( 'UserInput3',, 'OS2ENVIRONMENT' ) || '"'}
  1567. InputPrompt        = Enter a value
  1568. ErrorPrompt        = Press any key to continue
  1569. HelpPrompt         = Press any key to continue the program
  1570. FrameColor         = YELLOW ON BLACK
  1571. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1572. SelectedItemColor  = HIGHLIGHT GREEN ON MAGNENTA
  1573. ErrorTextColor     = RED ON GREEN
  1574. HelpForAlt_F1      =
  1575. InputVar           = UserInput3
  1576.  
  1577. ;                    Preceed the string with a ~ to simulate input for
  1578. ;                    RxLBox. Example:
  1579. ;
  1580. ;                    Pressing F6 is the same as entering
  1581. ;                    'My Comment' (without the quotes) on the input line
  1582. ;
  1583. FKey6              = ~My Comment
  1584.  
  1585. ;                    Pressing F7 is the same as entering
  1586. ;                    '{time()}' (without the quotes) on the input line
  1587. ;
  1588. FKey7              = {'~'time()}
  1589.  
  1590. MenuItem.#         = Accept the current values and leave the menu
  1591. Action.#           = #GoBack()
  1592.  
  1593. MenuItem.#         = ---------------------------------------------------------------------------
  1594. Action.#           = #NOP
  1595.  
  1596. ;                    Get some input from the user. In this example the
  1597. ;                    user input must be a number in the range 1 to 100.
  1598. ;                    The syntax for #UserInput is
  1599. ;
  1600. ;                       #UserInput() env_var {# checkStmt } {# errorMessage }
  1601. ;
  1602. ; If you use #UserInput for a menu entry in a menu with AcceptAllInput=YES,
  1603. ; #UserInput is used for that menu entry and AcceptAllInput for the menu
  1604. ; entries without #UserInput.
  1605. ; If you use #UserInput for a menu entry in a menu with InputVar=envVarName,
  1606. ; #UserInput is used for that menu entry and InputVar=envVarName for the menu
  1607. ; entries without #UserInput.
  1608. ;
  1609. ; To save the input of the user in a REXX variable use a variable of the
  1610. ; stem 'MENUDESC.'. 
  1611. ;
  1612. MenuItem.#         = {'The serial number is "' || envValue( 'SerialNumber' ) || '"' }
  1613. Action.#           = #UserInput() SerialNumber # \
  1614.                                   ( Datatype( envValue ) = 'NUM' ) & 1 <= envValue & envValue <= 100 # \
  1615.                                   Error: Serial number must be a number in the range 1 .. 100!
  1616. StatusLine.#       = Enter the serial number and press ENTER
  1617.  
  1618. ;                    Get some user input; accept every input
  1619. ;
  1620. MenuItem.#         = {'The machine type is "' || Envvalue( 'MachineType' ) || '"' }
  1621. Action.#           = #UserInput( UPPER ) MachineType
  1622. StatusLine.#       = Enter the machine type and press ENTER
  1623.  
  1624. MenuItem.#         = {'The memory amount is "' || EnvValue( 'Memory' ) || '"' }
  1625. Action.#           = #UserInput() Memory
  1626. StatusLine.#       = Enter the memory amount and press ENTER
  1627.  
  1628. ;                    Get some user input; accept every input with up to 20
  1629. ;                    characters
  1630. ;                    Note that the parts of the statement defining the
  1631. ;                    environment variable and the error message are
  1632. ;                    REXX statements evaluating to string!
  1633. ;
  1634. MenuItem.#         = {'The comment is "' || EnvValue( 'Comment' ) || '"' }
  1635. Action.#           = #UserInput( BLANK_OK ) { 'Comment' } # length( envValue ) <= 20 # { 'Error: The max. length for comment is 20! It''s now ' time() || '.' }
  1636. StatusLine.#       = Enter the comment and press ENTER (or only ENTER to delete the comment)
  1637.  
  1638. MenuItem.#         = ---------------------------------------------------------------------------
  1639. Action.#           = #NOP
  1640.  
  1641. MenuItem.#         = Set the variable UserInput3 (using the keyword INPUTVAR)
  1642. Action.#           = #NOP
  1643.  
  1644. ; --------------------------------------------------------------------
  1645. [*PasswordMenu*]
  1646. Title1             = This is a menu using OnInit to implement a password
  1647. Title2             = This menu uses OnExit to check the value entered by the user
  1648. Title3             = Note: You must set numberP to 98765 to leave this menu!
  1649. StatusLine         = { 'Current value of numberP is "' || value( 'numberP',, 'OS2ENVIRONMENT' ) || '"' }
  1650. InputPrompt        = Your input
  1651. ErrorPrompt        = Press any key to continue
  1652. HelpPrompt         = Press any key to continue the program
  1653. FrameColor         = YELLOW ON BLACK
  1654. ItemColor          = HIGHLIGHT CYAN ON BLUE
  1655. SelectedItemColor  = HIGHLIGHT GREEN ON MAGNENTA
  1656. ErrorTextColor     = RED ON GREEN
  1657. HelpForAlt_F1      =
  1658. InputVar           = NumberP
  1659. FKey11             =
  1660. FKey12             =
  1661. FKey8              =
  1662.  
  1663. ;
  1664. ; Note: OnInit and OnExit use the global variable MenuDesc.__pSem
  1665. ;       as semaphore.
  1666. ;
  1667. OnInit             = \
  1668.   if MenuDesc.__pSem <> 1 then ; \
  1669.   do ; \
  1670.     signal off error; \
  1671.     signal off notready; \
  1672.      call value 'NumberP', '', 'OS2ENVIRONMENT'; \
  1673.     'cls' ; \
  1674.     say '1B'x || '[1;36;44;m' ; \
  1675.     say '' ; \
  1676.     say '' ; \
  1677.     say center( 'This is a password protected menu', 80 ) ; \
  1678.     say '' ; \
  1679.     say 'Hint: The password is 12345'; \
  1680.     say '' ; \
  1681.     call CharOut , 'Enter the password for this menu: ' '1B'x || '[0;8;30;40;m' ; \
  1682.     if translate( strip( lineIn() ) ) <> '12345' then ; \
  1683.     do ; \
  1684.       'cls' ; \
  1685.       say '1B'x || '[1;36;44;m' ; \
  1686.       call beep 537,300 ; \
  1687.       say '' ; \
  1688.       say center( 'Error: You have entered an invalid password!',80 ) ; \
  1689.       say '' ; \
  1690.       call beep 237,300 ; \
  1691.       say center( 'Press any key to return to the previous menu ...', 80 ) ; \
  1692.       call beep 537,300 ; \
  1693.       call WaitForAKey ; \
  1694.       !curRC = 1 ; \
  1695.       MenuDesc.__pSem = 0 ; \
  1696.     end ; \
  1697.     else ; \
  1698.       MenuDesc.__pSem = 1 ; \
  1699.     say '1B'x || '[1;36;44;m' ; \
  1700.   end ;
  1701.  
  1702. OnExit             = \
  1703.   'cls' ; \
  1704.   say '1B'x || '[1;36;41;m' ; \
  1705.   if MenuDesc.__pSem = 1 then ; \
  1706.   do ; \
  1707.     if value( 'NumberP', , 'OS2ENVIRONMENT' ) <> '98765' then ; \
  1708.     do ; \
  1709.       'cls' ; \
  1710.       call beep 637,300 ; \
  1711.       say '' ; \
  1712.       say center( 'Error: You must enter the correct value before you can leave this menu!',80 ) ; \
  1713.       say '' ; \
  1714.       call beep 437,300 ; \
  1715.       say center( 'Press any key to return to the menu and try again...', 80 ) ; \
  1716.       call beep 637,300 ; \
  1717.       call WaitForAKey ; \
  1718.       !curRC = 1 ; \
  1719.     end  ; \
  1720.     else ; \
  1721.     do ; \
  1722.       call value 'NumberP', '', 'OS2ENVIRONMENT' ; \
  1723.       MenuDesc.__pSem = '' ; \
  1724.     end ; \
  1725.   end ; \
  1726.   else ; \
  1727.     MenuDesc.__pSem = ''
  1728.  
  1729. MenuItem.# = Leave this menu
  1730. Action.#   = #GOBACK
  1731.  
  1732. [*Menu7*]
  1733. Title1             = This is the menu "Menu7"
  1734. Title2             = { 'This is a menu with' !totalPageCount 'pages and' !totalEntryCount 'entries (and no online help)' }
  1735. Title3             = This menu contains also 2 invalid ListBox commands
  1736. StatusLine         = { 'The active menu entry is' !curEntryNo '(= entry no' !curLineNo 'on the menu page' !curPageNo ').'}
  1737.  
  1738. FrameColor         = YELLOW ON BLUE
  1739. ItemColor          = HIGHLIGHT CYAN ON RED
  1740. SelectedItemColor  = HIGHLIGHT YELLOW ON GREEN
  1741. Title1Color        = HIGHLIGHT YELLOW ON BLACK
  1742. Title2Color        = RED ON WHITE
  1743. Title3Color        = HIGHLIGHT GREEN ON MAGNENTA
  1744. StatusLineColor    = HIGHLIGHT CYAN ON BLUE
  1745. ErrorTextColor     = RED ON GREEN
  1746. InputLineColor     = BLACK ON YELLOW
  1747. CLS                = WHITE ON BLACK
  1748.  
  1749. HelpForF1          =
  1750.  
  1751. MenuItem.1         = -- MenuEntry 1 --
  1752. Action.1           = -- Action 1 --
  1753. MenuItem.2         = -- MenuEntry 2 --
  1754. Action.2           = -- Action 2 --
  1755. MenuItem.3         = -- MenuEntry 3 --
  1756. Action.3           = -- Action 3 --
  1757. MenuItem.4         = -- MenuEntry 4 (Invalid) --
  1758. Action.4 =         #InvalidMenuCommand()
  1759. MenuItem.5         = -- MenuEntry 5 (Invalid) --
  1760. Action.5 =         #InvalidMenuCommandLongerThan25Chars()
  1761. MenuItem.6         = -- MenuEntry 6 --
  1762. Action.6           = -- Action 6 --
  1763. MenuItem.7         = -- MenuEntry 7 --
  1764. Action.7           = -- Action 7 --
  1765. MenuItem.8         = -- MenuEntry 8 --
  1766. Action.8           = -- Action 8 --
  1767. MenuItem.9         = -- MenuEntry 9 --
  1768. Action.9           = -- Action 9 --
  1769. MenuItem.10        = -- MenuEntry 10 --
  1770. Action.10          = -- Action 10 --
  1771. MenuItem.11        = -- MenuEntry 11 --
  1772. Action.11          = -- Action 11 --
  1773. MenuItem.12        = -- MenuEntry 12 --
  1774. Action.12          = -- Action 12 --
  1775. MenuItem.13        = -- MenuEntry 13 --
  1776. Action.13          = -- Action 13 --
  1777. MenuItem.14        = -- MenuEntry 14 --
  1778. Action.14          = -- Action 14 --
  1779. MenuItem.15        = -- MenuEntry 15 --
  1780. Action.15          = -- Action 15 --
  1781. MenuItem.16        = -- MenuEntry 16 --
  1782. Action.16          = -- Action 16 --
  1783. MenuItem.17        = -- MenuEntry 17 --
  1784. Action.17          = -- Action 17 --
  1785. MenuItem.18        = -- MenuEntry 18 --
  1786. Action.18          = -- Action 18 --
  1787. MenuItem.19        = -- MenuEntry 19 --
  1788. Action.19          = -- Action 19 --
  1789. MenuItem.20        = -- MenuEntry 20 --
  1790. Action.20          = -- Action 20 --
  1791. MenuItem.21        = -- MenuEntry 21 --
  1792. Action.21          = -- Action 21 --
  1793. MenuItem.22        = -- MenuEntry 22 --
  1794. Action.22          = -- Action 22 --
  1795. MenuItem.23        = -- MenuEntry 23 --
  1796. Action.23          = -- Action 23 --
  1797. MenuItem.24        = -- MenuEntry 24 --
  1798. Action.24          = -- Action 24 --
  1799. MenuItem.25        = -- MenuEntry 25 --
  1800. Action.25          = -- Action 25 --
  1801. MenuItem.26        = -- MenuEntry 26 --
  1802. Action.26          = -- Action 26 --
  1803. MenuItem.27        = -- MenuEntry 27 --
  1804. Action.27          = -- Action 27 --
  1805. MenuItem.28        = -- MenuEntry 28 --
  1806. Action.28          = -- Action 28 --
  1807. MenuItem.29        = -- MenuEntry 29 --
  1808. Action.29          = -- Action 29 --
  1809. MenuItem.30        = -- MenuEntry 30 --
  1810. Action.30          = -- Action 30 --
  1811. MenuItem.31        = -- MenuEntry 31 --
  1812. Action.31          = -- Action 31 --
  1813. MenuItem.32        = -- MenuEntry 32 --
  1814. Action.32          = -- Action 32 --
  1815. MenuItem.33        = -- MenuEntry 33 --
  1816. Action.33          = -- Action 33 --
  1817. MenuItem.34        = -- MenuEntry 34 --
  1818. Action.34          = -- Action 34 --
  1819. MenuItem.35        = -- MenuEntry 35 --
  1820. Action.35          = -- Action 35 --
  1821. MenuItem.36        = -- MenuEntry 36 --
  1822. Action.36          = -- Action 36 --
  1823. MenuItem.37        = -- MenuEntry 37 --
  1824. Action.37          = -- Action 37 --
  1825. MenuItem.38        = -- MenuEntry 38 --
  1826. Action.38          = -- Action 38 --
  1827. MenuItem.39        = -- MenuEntry 39 --
  1828. Action.39          = -- Action 39 --
  1829. MenuItem.40        = -- MenuEntry 40 --
  1830. Action.40          = -- Action 40 --
  1831. MenuItem.41        = -- MenuEntry 41 --
  1832. Action.41          = -- Action 41 --
  1833. MenuItem.42        = -- MenuEntry 42 --
  1834. Action.42          = -- Action 42 --
  1835. MenuItem.43        = -- MenuEntry 43 --
  1836. Action.43          = -- Action 43 --
  1837. MenuItem.44        = -- MenuEntry 44 --
  1838. Action.44          = -- Action 44 --
  1839. MenuItem.45        = -- MenuEntry 45 --
  1840. Action.45          = -- Action 45 --
  1841. MenuItem.46        = -- MenuEntry 46 --
  1842. Action.46          = -- Action 46 --
  1843. MenuItem.47        = -- MenuEntry 47 --
  1844. Action.47          = -- Action 47 --
  1845. MenuItem.48        = -- MenuEntry 48 --
  1846. Action.48          = -- Action 48 --
  1847. MenuItem.49        = -- MenuEntry 49 --
  1848. Action.49          = -- Action 49 --
  1849. MenuItem.50        = -- MenuEntry 50 --
  1850. Action.50          = -- Action 50 --
  1851. MenuItem.51        = -- MenuEntry 51 --
  1852. Action.51          = -- Action 51 --
  1853. MenuItem.52        = -- MenuEntry 52 --
  1854. Action.52          = -- Action 52 --
  1855. MenuItem.53        = -- MenuEntry 53 --
  1856. Action.53          = -- Action 53 --
  1857. MenuItem.54        = -- MenuEntry 54 --
  1858. Action.54          = -- Action 54 --
  1859. MenuItem.55        = -- MenuEntry 55 --
  1860. Action.55          = -- Action 55 --
  1861. MenuItem.56        = -- MenuEntry 56 --
  1862. Action.56          = -- Action 56 --
  1863. MenuItem.57        = -- MenuEntry 57 --
  1864. Action.57          = -- Action 57 --
  1865. MenuItem.58        = -- MenuEntry 58 --
  1866. Action.58          = -- Action 58 --
  1867. MenuItem.59        = -- MenuEntry 59 --
  1868. Action.59          = -- Action 59 --
  1869. MenuItem.60        = -- MenuEntry 60 --
  1870. Action.60          = -- Action 60 --
  1871. MenuItem.61        = -- MenuEntry 61 --
  1872. Action.61          = -- Action 61 --
  1873. MenuItem.62        = -- MenuEntry 62 --
  1874. Action.62          = -- Action 62 --
  1875. MenuItem.63        = -- MenuEntry 63 --
  1876. Action.63          = -- Action 63 --
  1877. MenuItem.64        = -- MenuEntry 64 --
  1878. Action.64          = -- Action 64 --
  1879. MenuItem.65        = -- MenuEntry 65 --
  1880. Action.65          = -- Action 65 --
  1881. MenuItem.66        = -- MenuEntry 66 --
  1882. Action.66          = -- Action 66 --
  1883. MenuItem.67        = -- MenuEntry 67 --
  1884. Action.67          = -- Action 67 --
  1885. MenuItem.68        = -- MenuEntry 68 --
  1886. Action.68          = -- Action 68 --
  1887. MenuItem.69        = -- MenuEntry 69 --
  1888. Action.69          = -- Action 69 --
  1889. MenuItem.70        = -- MenuEntry 70 --
  1890. Action.70          = -- Action 70 --
  1891. MenuItem.71        = -- MenuEntry 71 --
  1892. Action.71          = -- Action 71 --
  1893. MenuItem.72        = -- MenuEntry 72 --
  1894. Action.72          = -- Action 72 --
  1895. MenuItem.73        = -- MenuEntry 73 --
  1896. Action.73          = -- Action 73 --
  1897. MenuItem.74        = -- MenuEntry 74 --
  1898. Action.74          = -- Action 74 --
  1899. MenuItem.75        = -- MenuEntry 75 --
  1900. Action.75          = -- Action 75 --
  1901. MenuItem.76        = -- MenuEntry 76 --
  1902. Action.76          = -- Action 76 --
  1903. MenuItem.77        = -- MenuEntry 77 --
  1904. Action.77          = -- Action 77 --
  1905. MenuItem.78        = -- MenuEntry 78 --
  1906. Action.78          = -- Action 78 --
  1907. MenuItem.79        = -- MenuEntry 79 --
  1908. Action.79          = -- Action 79 --
  1909. MenuItem.80        = -- MenuEntry 80 --
  1910. Action.80          = -- Action 80 --
  1911. MenuItem.81        = -- MenuEntry 81 --
  1912. Action.81          = -- Action 81 --
  1913. MenuItem.82        = -- MenuEntry 82 --
  1914. Action.82          = -- Action 82 --
  1915. MenuItem.83        = -- MenuEntry 83 --
  1916. Action.83          = -- Action 83 --
  1917. MenuItem.84        = -- MenuEntry 84 --
  1918. Action.84          = -- Action 84 --
  1919. MenuItem.85        = -- MenuEntry 85 --
  1920. Action.85          = -- Action 85 --
  1921. MenuItem.86        = -- MenuEntry 86 --
  1922. Action.86          = -- Action 86 --
  1923. MenuItem.87        = -- MenuEntry 87 --
  1924. Action.87          = -- Action 87 --
  1925. MenuItem.88        = -- MenuEntry 88 --
  1926. Action.88          = -- Action 88 --
  1927. MenuItem.89        = -- MenuEntry 89 --
  1928. Action.89          = -- Action 89 --
  1929. MenuItem.90        = -- MenuEntry 90 --
  1930. Action.90          = -- Action 90 --
  1931. MenuItem.91        = -- MenuEntry 91 --
  1932. Action.91          = -- Action 91 --
  1933. MenuItem.92        = -- MenuEntry 92 --
  1934. Action.92          = -- Action 92 --
  1935. MenuItem.93        = -- MenuEntry 93 --
  1936. Action.93          = -- Action 93 --
  1937. MenuItem.94        = -- MenuEntry 94 --
  1938. Action.94          = -- Action 94 --
  1939. MenuItem.95        = -- MenuEntry 95 --
  1940. Action.95          = -- Action 95 --
  1941. MenuItem.96        = -- MenuEntry 96 --
  1942. Action.96          = -- Action 96 --
  1943. MenuItem.97        = -- MenuEntry 97 --
  1944. Action.97          = -- Action 97 --
  1945. MenuItem.98        = -- MenuEntry 98 --
  1946. Action.98          = -- Action 98 --
  1947. MenuItem.99        = -- MenuEntry 99 --
  1948. Action.99          = -- Action 99 --
  1949. MenuItem.100       = -- MenuEntry 100 --
  1950. Action.100         = -- Action 100 --
  1951.  
  1952. ; --------------------------------------------------------------------
  1953. ; redefine the ESC key for the internal menus
  1954. ;
  1955. [*DefaultMenu*]
  1956. Esc                = #GOBACK()
  1957.  
  1958. ; --------------------------------------------------------------------
  1959. ; The following sections contain the online help for the menus
  1960. ;
  1961. ; The format of the section header is
  1962. ;
  1963. ;   [<help_topic>]
  1964. ;
  1965. ; where 'help_topic' is the name of the online help referenced in
  1966. ; the menu description keys 'HelpForF1', 'HelpForALT_F1' and
  1967. ; 'HelpForCTRL_F1'.
  1968. ;
  1969. ; Each line of the online help is displayed centered. You can use
  1970. ; any character in the online help. The only exception to this rule:
  1971. ; The first character of a line for the online help can NOT be the
  1972. ; character '['.
  1973. ;
  1974. ; Each online help can have up to 14 lines with up to 69 characters.
  1975. ; RxLBox displays all lines of the online help centered.
  1976. ;
  1977. ; Note: Use a dummy section to mark the end of an online help
  1978. ;       section (see below).
  1979. ;
  1980. ; Caution: Comments are NOT possible in online help sections!
  1981. ;
  1982.  
  1983.  
  1984. ; ----------------------------
  1985. [<MainHelp>]
  1986.  
  1987. This the online help for the main menu. The main menu is the default
  1988. menu displayed by RxLBox if it's called with no menu parameter.
  1989.  
  1990. Each online help can have up to 14 lines with up to 69 characters.
  1991.  
  1992. ---------------------------------
  1993.  
  1994. Use <CTRL-F1> to call the online help with the function key description.
  1995. Use <ALT-F1> to call the online help with the input line description.
  1996. [dummy section]
  1997.  
  1998. ; ----------------------------
  1999. [<MAIN_KeyHelp>]
  2000. F1 - show the online help
  2001. ALT-F1 - input line description   CTRL-F1 - function key description
  2002. F9 - refresh display
  2003. F8 - show macro list
  2004. F11 - show list of all menus      F12 - show menu history list
  2005. F10 - Quit                        ESC - go one menu back
  2006. RETURN - choose the highlighted entry
  2007.  
  2008. Use the cursor keys, PgDn, PgUp, Home, End, CTRL-Home and CTRL-End
  2009. to scroll through the menu.
  2010.  
  2011. ------- additional keys defined in the menu description file -------
  2012.         F2 - show macro list      F4 - call CMD.EXE    F5 - dir
  2013. [dummy section]
  2014.  
  2015. ; ----------------------------
  2016. [<KeyHelp>]
  2017. F1 - show the online help
  2018. ALT-F1 - show the input line description
  2019. CTRL-F1 - show the function key description
  2020.  
  2021. F8 - show macro list              F9 - refresh display
  2022. F11 - show list of all menus      F12 - show menu history list
  2023.  
  2024. F10 - Quit                        ESC - go one menu back
  2025.  
  2026. RETURN - choose the highlighted entry
  2027.  
  2028. Use the cursor keys, PgDn, PgUp, Home, End, CTRL-Home and CTRL-End
  2029. to scroll through the menu.
  2030. [dummy section]
  2031.  
  2032. ; ----------------------------
  2033. [<InputLineHelp>]
  2034. +n - scroll down n entries        -n scroll up n entries
  2035.  n - choose the entry n if its on the current page or
  2036.      jump to the entry if it's not on the current page
  2037.  
  2038.  *command - execute the OS/2 command 'command' (Preceed the command
  2039.             with another asterix '*' to wait after execution)
  2040.  
  2041.  macroName - execute the macro 'macroName'
  2042.  
  2043.  {rexx_statement} - use the result of the REXX statement as input
  2044.  
  2045. ---------------------------------
  2046. Use <F1> to call the general online help
  2047. Use <CTRL-F1> to call the online help with the key description.
  2048. [dummy section]
  2049.  
  2050.  
  2051. ; ----------------------------
  2052. [<DefaultHelp>]
  2053. This is the default online help for all menus without an own online
  2054. help section.
  2055. [dummy section]
  2056.  
  2057.  
  2058. ; ----------------------------
  2059. [<This is a menu with a long section name>]
  2060. 1 This is line 1 of the online help
  2061. 2 This is line 2 of the online help
  2062. 3 This is line 3 of the online help
  2063. 4 This is line 4 of the online help
  2064. 5 This is line 5 of the online help
  2065. 6 This is line 6 of the online help
  2066. 7 This is line 7 of the online help
  2067. 8 This is line 8 of the online help
  2068. 9 This is line 9 of the online help
  2069. 10 This is line 10 of the online help
  2070. 11 This is line 11 of the online help
  2071. 12 This is line 12 of the online help
  2072. 13 This is line 13 of the online help
  2073. 14 This is line 14 of the online help
  2074. [dummy section to mark the end of the online help!]
  2075.  
  2076. ; ----------------------------
  2077. [<Menu2_Help>]
  2078.  This is the online help for the Menu2
  2079.  
  2080.  RxLBox returns every input not known by RxLBox entered in this menu
  2081.  to the calling program. To return a string simply enter it; to return
  2082.  the result of a REXX statement surround it with '{' and '}'.
  2083.  
  2084.  Example: To return the current time enter
  2085.           {time()}
  2086.  
  2087.  Preceed the input with '^', if you want to return a string beginning
  2088.  with one of the chars '#*{^'.
  2089.  
  2090. [dummy section to mark the end of the online help!]
  2091.  
  2092.  
  2093. ; ----------------------------
  2094. [<Menu3_Help>]
  2095.  This is the online help for the Menu3
  2096. [dummy section to mark the end of the online help!]
  2097.  
  2098. ; ----------------------------
  2099. [<Menu4_CtrlHelp>]
  2100. All function keys are redefined in this menu!
  2101. [dummy section to mark the end of the online help!]
  2102.  
  2103. ; ----------------------------
  2104. [<Menu4_Help>]
  2105.  
  2106.  This is the online help for the Menu4
  2107. [dummy section to mark the end of the online help!]
  2108.  
  2109. ; --------------------------------------
  2110. ; The following sections contain the help textes for the
  2111. ; internal menus ( MacroList, HistoryList and MenuList)
  2112. ;
  2113. ; ----------------------------
  2114. [<MacroListOnlineHelp>]
  2115.  
  2116.  This is the online help for the Macro List
  2117.  
  2118.  This menu contains an entry for every macro
  2119.  defined in the menu descriptions. You can
  2120.  execute a macro by selecting the approbiate
  2121.  entry in this menu and pressing ENTER.
  2122.  
  2123.  (Use #SHOWHELP)
  2124.  
  2125. [dummy section to mark the end of the online help!]
  2126.  
  2127. ; ----------------------------
  2128. [<HistoryListOnlineHelp>]
  2129.  
  2130.  This is the online help for the History List
  2131.  
  2132.  This menu contains an entry for each menu called 
  2133.  so far. The current menu is the last entry in 
  2134.  this menu.
  2135.  
  2136.  (Use #SHOWHELP)
  2137.  
  2138. [dummy section to mark the end of the online help!]
  2139.  
  2140. ; ----------------------------
  2141. [<MenuListOnlineHelp>]
  2142.  
  2143.  This is the online help for the menu List
  2144.  
  2145.  This menu contains an entry for every menu found
  2146.  in the menu descriptions. 
  2147.  
  2148.  (Use #SHOWHELP)
  2149.  
  2150. [dummy section to mark the end of the online help!]
  2151.  
  2152. ; ----------------------------
  2153. [<InternalMenu_KeyHelp>]
  2154.  
  2155. This is the online help for CTRL-F1 while the MacroList, the
  2156. HistoryList or the MenuList is active.
  2157. (Use #SHOWKEYHELP)
  2158.  
  2159. [dummy section to mark the end of the online help!]
  2160.  
  2161. ; ----------------------------
  2162. [<InternalMenu_InputLineHelp>]
  2163.  
  2164. This is the online help for ALT-F1 while the MacroList, the
  2165. HistoryList or the MenuList is active.
  2166. (use #SHOWLINEHELP)
  2167.  
  2168. [dummy section to mark the end of the online help!]
  2169.  
  2170. ; --------------------------------------------------------------------
  2171.  
  2172.