home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxdlg11.zip / rx.INF (.txt) < prev    next >
OS/2 Help File  |  1995-09-22  |  129KB  |  4,358 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. As an interpreted, high level language, REXX is supposed to be one of the 
  5. easiest languages to use.  This means that a programmer can write useful 
  6. programs with a minimal investment of time and effort.  Unfortunately, REXX has 
  7. one very big drawback; its facilities to get input and output from an enduser 
  8. are positively primitive.  It can do little more than poll the command line 
  9. (ie, the enduser has to type in his input, one line at a time), and display 
  10. text messages to that same command line.  REXX certainly doesn't support any of 
  11. the features that OS/2's Presentation Manager makes possible, such as using the 
  12. mouse and keyboard to manipulate scrolling lists of text, menus, sliders, 
  13. buttons, etc, as well as being able to arrange all of these in multiple windows 
  14. that also can be manipulated with the mouse and keyboard.  With such PM 
  15. controls and dialogs, a programmer can create a much easier to use, and more 
  16. sophisticated, interface.  Wouldn't it be nice to be able to combine PM's 
  17. flexibility with REXX's simplicity?  Sure it would, and that's why there are a 
  18. few products that "extend" REXX to give it a PM interface (ie, add new REXX 
  19. commands that interface to PM, by having the REXX interpreter call C compiled 
  20. code in custom Dynamic Link Libraries which implements those new commands). 
  21. Rexx Dialog is one more such product; except that it's free, and it's small and 
  22. memory efficient because it doesn't try to do too much.  It's sort of my 
  23. version of VREXX and PMREXX, but a lot more flexible in the way that it lets 
  24. you create and manage a PM interface for your REXX script.  Using Rexx Dialog, 
  25. you can quickly create a PM program in REXX. 
  26.  
  27. It is hoped that, by making a tool such as Rexx Dialog freely available (and 
  28. some of the other freebies that I've created such as FILEREXX.DLL), other 
  29. programmers will continue that spirit and create even more OS/2 native software 
  30. (which is very much needed right now) and freely distribute such. 
  31.  
  32.  
  33. Some of the words in this manual are highlighted in bold text, such as Group 
  34. Type.  These are words that refer to something that you have to setup in your 
  35. REXX script to use Rexx Dialog to create and manage a PM interface.  Other 
  36. words are in colored text such as RXVAL.  These refer to actual REXX variables 
  37. in your script (ie, the names of variables).  Underlined words, such as RXSAY, 
  38. refer to actual REXX commands created by Rexx Dialog, which your REXX script 
  39. calls to create and manage a PM interface. Some words are in colored text such 
  40. as Read This are meant to be emphasized.  Words in italics refer to aspects of 
  41. OS/2. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 2. Copyright ΓòÉΓòÉΓòÉ
  45.  
  46. Rexx Dialog (comprised of the files RXDLG.DLL, RX.EXE, RX.INF, RXCAPP.INF and 
  47. all example REXX scripts written by Jeff Glatt) are all copyright 1995 by Jeff 
  48. Glatt.  These files are freely redistributable, and may be used by and 
  49. distributed along with any software, be it commercial or otherwise, provided 
  50. that these files are not internally modified, nor specifically sold as a 
  51. complete product by themselves.  The only price that you have to pay is the one 
  52. that you're already paying by spending all of your time in front of a computer 
  53. instead of developing healthier outlets. 
  54.  
  55. NOT SO STANDARD DISCLAIMER: 
  56.  
  57. These programs are provided "as is" without warranty of any kind either 
  58. expressed or implied or tatooed in a place that only a few people have ever 
  59. seen, including but not limited to the implied warranties of merchantability, 
  60. fitness for a particular purpose, and the dubious assumption that the software 
  61. has been created by a sane individual who would never do anything that may hurt 
  62. you. The entire risk as to the results and performance of the programs is 
  63. assumed by you or someone who looks exactly like you.  Jeff Glatt does not 
  64. guarantee that the functions in these programs will meet your requirements, 
  65. especially if your requirements involve lots of latex and some docile, 
  66. domesticated animal.  Nor does Jeff Glatt warranty the programs to be 
  67. uninterruptable or error-free, although mercifully free of "General Protection 
  68. Faults".  If you use said programs, you can not say anything nasty about the 
  69. author, even if the programs inadvertently cause the erasure of your collection 
  70. of X-rated GIFs of a conservative, overweight and overrated TV "personality" 
  71. plooking himself vigorously with his royalty checks from some rancid paperback. 
  72. Jeff Glatt is not responsible for any damages as a result of anything that he 
  73. has done, or hasn't done, or was supposed to do but never got around to it, and 
  74. furthermore, he doesn't even care so leave him alone, ratface.  You may have 
  75. more or less protections in certain states of the union, depending upon how far 
  76. your local politician is willing to bend over for some bribe from a business 
  77. lobbyist.  Just remember that Jeff Glatt has no money, so don't bother suing 
  78. him as a result of any damages caused by this OS/2 program.  Tell your greasy 
  79. lawyer to go after IBM, and make sure that you pick 12 really stupid pinheads 
  80. for the jury.  If swallowed, induce vomiting immediately by contemplating the 
  81. asthetics of Microsoft Windows. 
  82.  
  83. OS/2 is a trademark of International Business Machines Corporation. 
  84.  
  85. Windows is a trademark of Microsoft Incorporated, and furthermore, Bill Gates 
  86. is to blame for it. 
  87.  
  88. If you have unreasonably presumptuous suggestions (ie, an enduser who expects 
  89. outrageous amounts of free support), snide comments, criticisms, and anything 
  90. else other than dollar bills, then send them to someone else because you got it 
  91. for free, and you know what you get for nothing?  On the other hand, any type 
  92. of positive contribution from other programmers is very much welcome and 
  93. encouraged as these are the only folks who can made things happen for OS/2. 
  94. IBM ain't gonna do it.  If you do need to contact the author, then either phone 
  95. some of the more prominent psychiatrict clinics in central New York state, or 
  96. try this: 
  97.  
  98. Jeff Glatt 
  99. 6 Sycamore Drive East 
  100. New Hartford, NY 13413 
  101. (315) 735-5350 
  102.  
  103. Sure, this copyright notice has attitude.  Get used to it, or kill yourself. 
  104.  
  105.  
  106. ΓòÉΓòÉΓòÉ 3. Version Errata ΓòÉΓòÉΓòÉ
  107.  
  108. This is version 1.1.  This corrects a bug in which, when numerous groups of 
  109. Radio buttons were placed within a single window, clicking upon one radio 
  110. button group caused all other groups to lose their visual highlighting 
  111. (although not the actual selection within the group).  It also adds the main 
  112. window to Presentation Manager's Window List. 
  113.  
  114.  
  115. ΓòÉΓòÉΓòÉ 4. Initial Setup and Requirements ΓòÉΓòÉΓòÉ
  116.  
  117. There are 2 files that comprise the Rexx Dialog facility; RX.EXE and RXDLG.DLL. 
  118. These must be present upon any system that runs scripts which utilize Rexx 
  119. Dialog's new commands to create and manage a PM interface. Of course, the OS/2 
  120. REXX Interpreter must also be installed upon the system (although PMREXX does 
  121. not need to be -- especially now that you have Rexx Dialog). 
  122.  
  123. RX.EXE is an executable that you use to start up your REXX script.  At an OS/2 
  124. command prompt, you type RX, followed by the name of your REXX script (with 
  125. full path if necessary).  For example, to start the REXX script "blort.cmd", 
  126. you would type: 
  127.  
  128. rx blort 
  129.  
  130. and then press ENTER. 
  131.  
  132. Note:  It's not necessary to type the .exe extension on rx.exe, nor the cmd 
  133.        extension on the script name.
  134.  
  135. You must use RX.EXE to start (and run) your REXX script, or the REXX 
  136. interpreter won't understand the special, new commands that Rexx Dialog makes 
  137. available to your script, and you'll get an error message saying that "The name 
  138. specified is not recognized as an internal or external command, operable 
  139. program, or batch file".  RX.EXE takes care of all of the details of telling 
  140. the REXX interpreter what the new commands are (so that your script can use 
  141. them) and also runs your script. 
  142.  
  143. RX.DLL is a Dynamic Link Library used by RX.EXE.  RX.EXE must be able to find 
  144. this DLL, so you should copy it to some place that is specified on the LIBPATH 
  145. statement of your config.sys file.  A good place is C:\OS2\DLL.  Also, it's 
  146. recommended that RX.EXE be copied to some place that is specified by the PATH 
  147. statement.  A good place is C:\OS2. 
  148.  
  149. If you would like to setup your script so that it runs by clicking upon a 
  150. Desktop icon (ie, object), that's easy to do.  Open the Templates folder on the 
  151. Desktop.  Drag the Program object to whichever place you want to put the icon 
  152. for your script, and release the mouse button (ie, drop the icon there).  A 
  153. Notebook should pop up, with the Settings page displayed.  In the Path and 
  154. Filename entry, type RX.EXE.  If you didn't copy RX.EXE to some place specified 
  155. in your config.sys PATH, then you'll need to specify the complete path, for 
  156. example, C:\OS2\RX.EXE.  Make sure that RXDLG.DLL is copied to some place 
  157. specified in your config.sys LIBPATH (or you can usually place it in the same 
  158. directory as the scripts that use Rexx Dialog).  In the Parameters field of the 
  159. Notebook, type the name of your REXX script.  Again, you may need to specify 
  160. the full path.  Now whenever you click upon that icon, your script will run, 
  161. and be able to use Rexx Dialog's new commands. 
  162.  
  163. Repeat the above process with every REXX script for which you'd like to setup a 
  164. Desktop icon, and which will use Rexx Dialog. 
  165.  
  166. Note:  It doesn't matter whether you launch your REXX script from the OS/2 
  167.        command prompt (as described above) or a Desktop icon.  Your script will 
  168.        run as if it were a real PM program regardless. 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ 5. Rexx ΓòÉΓòÉΓòÉ
  172.  
  173. REXX is a computer language.  It's interpreted, like BASIC, which means that 
  174. you simply write your program as an ordinary text file, and some interpreter 
  175. runs that text file directly.  There's no need for you to compile and link your 
  176. source code into an executable program.  Your text file *IS* your program (and 
  177. can be created with any text editor such as the OS/2 System Editor, or the 
  178. Enhanced Editor).  So, REXX is a script language.  But, it has lots of 
  179. features, including variables, string processing, looping, etc.  Consult the 
  180. "Rexx User's Guide" on the OS/2 PDK, or the "Rexx Procedures/2" online book for 
  181. a description of fundamental things that can be done with REXX. 
  182.  
  183. The REXX interpreter is built into OS/2.  That's why you can run a REXX script 
  184. (ie, text file containing REXX instructions) just by typing its name from an 
  185. OS/2 Command Prompt window. 
  186.  
  187. OS/2 programs may be written to also start up REXX scripts.  RX.EXE is one such 
  188. program.  It is used to start your REXX script so that your script has 9 
  189. special commands to call in order to create and manage a PM interface. 
  190.  
  191. There's a very important difference between running a REXX script using RX.EXE, 
  192. and running a script from a Command Prompt window.  When you run a REXX script 
  193. using RX.EXE, RX.EXE takes care of all of the details of letting the REXX 
  194. interpreter know what the new commands are.  Your REXX script can immediately 
  195. use those new commands.  RX.EXE also helps your script create and manage the PM 
  196. interface that your script specifies. 
  197.  
  198. RX.EXE does not pass any args to your REXX script. 
  199.  
  200. Note:  It's advisable to first read the OS/2 documentation on REXX, and 
  201.        experiment with the standard commands and features.  The REXX examples 
  202.        here may use some standard features without explaining them.  Mostly, 
  203.        the examples will illustrate the 9, special commands that Rexx Dialog 
  204.        makes available to create and manage a PM interface.
  205.  
  206.  
  207. ΓòÉΓòÉΓòÉ 6. Rexx Dialog Commands ΓòÉΓòÉΓòÉ
  208.  
  209. The 9 special Rexx Dialog commands that your script can call to create and 
  210. manage a PM interface all begin with the 2 letters RX.  Here are the 4 
  211. commands: 
  212.  
  213. RXACTIVE 
  214. RXDLG 
  215. RXERR 
  216. RXFILE 
  217. RXHELP 
  218. RXQUERY 
  219. RXSAY 
  220. RXSET 
  221. RXVERS 
  222.  
  223. You can begin a line in your REXX script with one of these commands.  Then, 
  224. when the script is run, the REXX interpreter executes the command when it gets 
  225. to that line. 
  226.  
  227. Most of the commands will have arguments.  This is just additional text that 
  228. you place after the command, on the same line.  Arguments modify the way that a 
  229. Rexx Dialog command works, or provide necessary additional information for the 
  230. command to use. 
  231.  
  232. Note:  It's OK to put blank spaces before and after commands, and inbetween 
  233.        arguments.  This makes your script easier for you to read.
  234.  
  235. All Rexx Dialog commands return either a string or number (depending upon which 
  236. you specify via RXERR, but some commands always return strings).  The return is 
  237. stored in the special REXX symbol RC.  As each command is issued, RC reflects 
  238. what that command returns.  The return usually tells you whether a command 
  239. worked or failed (although sometimes the return provides other info instead 
  240. such as which button was used to dismiss a RXSAY box).  In the case of a 
  241. command that could fail as a result of something that goes wrong within the 
  242. command, you should always check RC after issuing that command.  Alternately, 
  243. since all Rexx Dialog commands set the REXX FAILURE or ERROR flags for any 
  244. possible errors, you can SIGNAL ON ERROR or SIGNAL ON FAILURE to an appropriate 
  245. place in your REXX script to handle such an error situation. An RC of 0 (for 
  246. error numbers) or an empty string, ie "" (for error strings) is considered to 
  247. be a successful return. 
  248.  
  249. The following descriptions of each command tell what the template for the 
  250. command is (ie, how you notate it in your script), what the command does, what 
  251. the arguments are, what it returns to your REXX script, and examples of using 
  252. the command. 
  253.  
  254.  
  255. ΓòÉΓòÉΓòÉ 6.1. RXACTIVE ΓòÉΓòÉΓòÉ
  256.  
  257. Template       RXACTIVE 
  258.  
  259. Description    This command determines which open window is the active one, and 
  260.                sets the REXX variable RXWIND to that window's title.  It also 
  261.                sets the REXX variables RXID and RXSUBID to the Group # and 
  262.                Control # that have the focus.  For example, if the user 
  263.                happened to be using the first control of the first Group in a 
  264.                window titled "Window 1", then RXWIND is 'Window 1', RXID is 1, 
  265.                and RXSUBID is 1.  If the window itself has the focus (ie, the 
  266.                window is active but the user has not activated any particular 
  267.                control inside of that window), then RXID and RXSUBID are set to 
  268.                0. 
  269.  
  270.                If none of the open windows are active, this indicates that the 
  271.                user has made some other application's window active.  In this 
  272.                case, RXWIND is set to a NULL string (ie, ''). 
  273.  
  274. Args 
  275.  
  276. None. 
  277.  
  278. Returns 
  279.  
  280. Sets RXWIND, RXID, and RXSUBID. 
  281.  
  282. Examples 
  283.  
  284. /* This gets and displays RXWIND, RXID and RXSUBID for the active window */ 
  285.  
  286. RXACTIVE 
  287. RXSAY 'Active Window = "'RXWIND'"' 
  288. RXSAY 'Active Group = 'RXID 
  289. RXSAY 'Active Control = 'RXSUBID 
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ 6.2. RXDEV ΓòÉΓòÉΓòÉ
  293.  
  294. Template       RXDEV DeviceTitle Operation Value 
  295.  
  296. Description    This command is used to setup for reading from devices or pipes. 
  297.                The input will be returned when your script calls RXDLG. 
  298.  
  299.                Note:  You must have a Main Window open before calling RXDEV. 
  300.                       Closing the Main Window also performs RXDEV's CLOSE 
  301.                       Operation upon any opened and initialized devices.
  302.  
  303.                PM applications (including REXX scripts written for Rexx Dialog) 
  304.                must approach reading from devices differently than non-PM apps 
  305.                (ie, REXX scripts launched like they normally are; without a PM 
  306.                interface).  This is due to 2 design limitations of OS/2.  First 
  307.                of all, PM has a single system queue which requires a PM app's 
  308.                window procedure to complete its work in 1/10 of a second.  If a 
  309.                PM app doesn't do this, it will appear to "lock up" the desktop. 
  310.                The other design limitation of OS/2 is its very awful 16-bit 
  311.                Physical Device Driver model, which is essentially a more 
  312.                convoluted version of MS-DOS 2.0's driver model.  This model 
  313.                lacks standardized approaches to such things as querying if any 
  314.                input is available for reading, or setting a time-out for reads 
  315.                (ie, if no input is received within a certain amount of time, 
  316.                the read is aborted).  As might be expected, communication 
  317.                between an archaic 16-bit driver model and modern 32-bit 
  318.                application software is grotesquely crude and inflexible, and 
  319.                therefore, driver programmers have resorted to all manner of 
  320.                proprietary schemes to implement these features that IBM never 
  321.                wrote into OS/2's PDD model.  Worse, many drivers don't even 
  322.                bother to implement the features at all.  So, a call to DosRead 
  323.                input from a device may result in the app being "blocked" (ie, 
  324.                halted) until input is available for reading, and this may take 
  325.                much longer than 1/10 of a second.  Therefore, a PM app must 
  326.                have a separate thread to read input from a device.  Its main 
  327.                thread must not call any function that ultimately calls DosRead 
  328.                when reading from a device.  (ie, Standard functions such as 
  329.                STREAM, CHARIN, and LINEIN must not be used when reading from a 
  330.                device.  Neither can you use FileRexx's FileRead, FileGets, or 
  331.                FileReadValue, nor any other function library's input routines 
  332.                that call DosRead, such as RXASYNC.  Hey, if you don't like it, 
  333.                tell IBM to fix PM's single system queue, and implement a more 
  334.                modern PDD model, preferably 32-bit).  In lieu of these 
  335.                functions, you'll use RXDEV to setup a device for reading, and 
  336.                then retrieve input from the device via RXDLG.  To make things 
  337.                easier, Rexx Dialog's device reading has such features as being 
  338.                able to read whole blocks of data (ie, more than 1 character at 
  339.                a time), and discard input that doesn't begin or end with 
  340.                certain patterns, parse input into several REXX variables, and 
  341.                perform binary to REXX variable conversion.  So, it's sort of 
  342.                like a combination of FileGets, FileRead, and FileReadValue, 
  343.                which should handle the bulk of your needs. 
  344.  
  345. Args 
  346.  
  347. DeviceTitle    The title (ie, string) of the device, which can be any title of 
  348.                your choosing.  If there are blank spaces in the title, then 
  349.                enclose the string with two pairs of quotes '"' (or "'") if the 
  350.                title is a variable, or '" and "' (or "' and '") if a literal 
  351.                string.  For example, these are legal titles: 
  352.  
  353.                '"'title'"'  /* title would be some variable that you 
  354.                initialized earlier, for example, title='My Device Title' */ 
  355.                '"My Device Title"' 
  356.  
  357.                This is used to identify the device in the same way that the 
  358.                WindowTitle arg to RXDLG identifies a window.  The DeviceTitle 
  359.                should be unique from any other device that you have setup for 
  360.                reading with RXDEV.  If you specify a DeviceTitle of '""', then 
  361.                this refers to the first device that has been initialized (and 
  362.                is not yet closed) with RXDEV. 
  363.  
  364. Value          The meaning of the Value arg depends upon the Operation arg (and 
  365.                may not need to be supplied for some Operations). 
  366.  
  367. Operation      Operation is one of the following: 
  368.  
  369. INIT           This operation must be performed before any other operations. 
  370.                It sets up a device for reading (and will begin the reading 
  371.                unless the PAUSE Flag is set).  Prior to performing this 
  372.                operation, you must setup several REXX variables to desired 
  373.                values.  After the INIT operation, these variables can be 
  374.                discarded. 
  375.  
  376.                First, you must open the device for reading using FILEREXX's 
  377.                (ie, my REXX function library for doing device I/O, available 
  378.                separately) FileOpen.  If you're going to also be doing writes 
  379.                to the device (ie, using FILEREXX's FileWrite, FilePuts, or 
  380.                FileWriteValue), you can open the device for both reading and 
  381.                writing, and use this one handle for both FILEREXX and Rexx 
  382.                Dialog.  You must store the handle returned by FileOpen in the 
  383.                REXX variable RXINFO before doing the INIT operation. 
  384.  
  385.                The REXX variable RXCOUNT contains the size of the input buffer, 
  386.                and a count limit.  Rexx Dialog can return blocks of data (ie, 
  387.                more than 1 character or 8-bit byte) to your script.  For 
  388.                example, you can ask Rexx Dialog to return the next 64 bytes of 
  389.                data read from the device, when you call RXDLG once.  The count 
  390.                limit is how many bytes to input before they are returned to 
  391.                your script.  For example, a count of limit of 64 would mean 
  392.                that after reading 64 bytes, a call to RXDLG returns those 64 
  393.                bytes to your script.  The input buffer must be at least 4 bytes 
  394.                larger than the count limit.  Rexx Dialog implements a circular 
  395.                buffer.  This helps to speed up device reads, but unless your 
  396.                script can receive and process input faster than Rexx Dialog 
  397.                reads it, further device input may overwrite previous input. 
  398.                You can work around this either by using the PAUSE Flag, or by 
  399.                setting the size of the input buffer to be at least twice your 
  400.                count limit (plus 4 bytes that Rexx Dialog uses for 
  401.                bookkeeping).  So, if your count limit is 64, and you want 
  402.                double-buffering, then set the input buffer size to (64+4)*2. 
  403.                If you need triple buffering, set the buffer size to (count 
  404.                limit + 4)*3.  Etc.  If you specify a buffer size of 0, then 
  405.                4096 bytes is used.  This corresponds to a page of memory.  It's 
  406.                best to round up your buffer size to a multiple of 4096 (or use 
  407.                a default of 0 if you don't need more than 4096 bytes), as that 
  408.                won't use any more memory, due to OS/2's paging system.  If you 
  409.                don't specify the count limit, it defaults to a setting 
  410.                appropriate for double buffering.  The buffer size and count 
  411.                limit are restricted to 65,535 or less. 
  412.  
  413.                RXLABEL is set to the name of the REXX stem variable where the 
  414.                device input is returned.  The variable name should be limited 
  415.                to 22 characters.  All of the returned bytes are stored in that 
  416.                variable name with a .0 extension.  For example, if you specify 
  417.                RXLABEL = 'MYINPUT', and a count limit of 3, then a call to 
  418.                RXDLG returns those 3 characters in MYINPUT.0.  If the NUM flag 
  419.                is set, then each byte is expressed as an ascii numeric value 
  420.                (in decimal, a range of 0 to 255), with a space inbetween each 
  421.                value.  For example, if a line feed and carriage return were 
  422.                returned, MYINPUT.0 would be '13 10'.  If the SIGN Flag is set 
  423.                (in addition to NUM), then the ascii numeric values are 
  424.                expressed as signed (instead of unsigned) values (ie, a range of 
  425.                -128 to 127).  The returned string is limited to 255 characters. 
  426.                If the PARSE Flag is set, then each byte is returned in a 
  427.                different stem variable (and the 255 character limit is not 
  428.                applicable).  For example, the first byte is returned in 
  429.                MYINPUT.0, the second byte is returned in MYINPUT.1, and the 
  430.                third byte is returned in MYINPUT.2.  Both the NUM and PARSE 
  431.                flags can be set. 
  432.  
  433.                RXSTARTPAT is set to a string containing various patterns, one 
  434.                of which must be matched before device input is saved.  This 
  435.                makes it possible to discard device input until a certain 
  436.                pattern is spotted, and then start collecting all data at that 
  437.                point.  Each pattern in the start string must be separated by a 
  438.                | character.  If RXSTARTPAT is a null string, then all device 
  439.                input is saved (ie, start pattern match is disabled). 
  440.  
  441.                Each pattern can contain one or more characters or values.  A 
  442.                pattern begins with a "Format" letter.  This is an 'H' if you're 
  443.                expressing the values in hexadecimal, a 'B' if you're expressing 
  444.                the values in binary, a 'D' if you're expressing the values in 
  445.                decimal, or an 'L' if the characters are not to be translated in 
  446.                any way (ie, a literal string).  For 'H', 'B', or 'D', Rexx 
  447.                Dialog translates each value to its binary equivalent when used 
  448.                in a start pattern.  For example, if you want to set a start 
  449.                pattern that looks for a line feed and a carriage return 
  450.                characters, you could express the LF and CR in decimal as so: 
  451.  
  452.                'D 13 10' 
  453.  
  454.                Or, you could express them each in hexidecimal: 
  455.  
  456.                'H D A' 
  457.  
  458.                Or, you could even express them in binary: 
  459.  
  460.                'B 1101 1010' 
  461.  
  462.                If the "Format" is 'L', then the value string is used verbatim 
  463.                without any translation to binary values. For example, to set a 
  464.                start pattern that looks for the string 'hello': 
  465.  
  466.                'L hello' 
  467.  
  468.                The Format can have an extension, which I'll refer to as the 
  469.                "Count".  This will be how many values of that type follow.  If 
  470.                the Count arg is omitted, then the field's size is ultimately 
  471.                determined by however many values follow.  For example, if you 
  472.                had a field that consisted of 32 decimal values, you could 
  473.                define the Format and Count as D.32 and then list the 32 values 
  474.                after that.  If you don't supply as many values as "Count", then 
  475.                null bytes are used to pad out to Count.  There can be an 
  476.                additional extension after the Count, which I'll refer to as an 
  477.                "Initialization".  This will be either a numeric value that it 
  478.                is to be duplicated for Count times, or a (non-numeric) 
  479.                character that it is to be duplicated Count times.  For example, 
  480.                if you wanted to specify 32 decimal values and set them all to 
  481.                the value 16, the Format, Count, and Initialization would be 
  482.                D.32.16 with no need to specify any values after that.  If you 
  483.                wanted to specify 4 'A' chars, the Format, Count, and 
  484.                Initialization would be L.4.A with no need to specify any chars 
  485.                after that. 
  486.  
  487.                It's also permissible to have more than one Format, Count, and 
  488.                values (or Initialization) per field.  But, all of the Formats 
  489.                must also have a Count, except for the last Format (which may or 
  490.                may not have a Count).  For example, say that you want to set a 
  491.                start pattern of 'hello' followed by a line feed and carriage 
  492.                return: 
  493.  
  494.                'L.5 hello D 13 10' 
  495.  
  496.                Here's an example of setting 2 start patterns.  One pattern is 
  497.                'OK', and the other pattern is 'NO'.  So, device input is 
  498.                ignored until either string is detected. 
  499.  
  500.                'L OK | L NO' 
  501.  
  502.                The returned input starts with the matching start pattern (ie, 
  503.                it's part of the returned input) unless the TRIM Flag is set (in 
  504.                which case the start pattern is trimmed from the returned 
  505.                input). 
  506.  
  507.                If the WATCH Flag is set, then the device input is returned as 
  508.                soon as a start pattern is matched (ie, the returned input 
  509.                consists only of the matching start pattern).  This is useful if 
  510.                you need to throw away all device input except for a particular 
  511.                set of patterns. 
  512.  
  513.                RXENDPAT is also set to a string containing various patterns. 
  514.                If one of these patterns is matched, then the device input is 
  515.                returned to the script at that point, regardless of whether the 
  516.                count limit has been met.  This makes it possible to force 
  517.                device input to be returned as soon as a certain pattern is 
  518.                spotted.  Each pattern in the end string must be separated by a 
  519.                | character.  The format of the string is the same as per 
  520.                RXSTARTPAT.  If RXENDPAT is a null string, then device input 
  521.                isn't returned until the count limit is reached (ie, end pattern 
  522.                match is disabled). 
  523.  
  524.                The returned input ends with the matching end pattern (ie, it's 
  525.                part of the returned input) unless the TRIM Flag is set (in 
  526.                which case the end pattern is trimmed from the returned input). 
  527.  
  528.                RXFLAGS is any or all of the following, with each flag separated 
  529.                by a | character. 
  530.  
  531.                TRIM    Trim any matching start and/or end pattern from the 
  532.                returned input. 
  533.                NUM    Translate each returned byte to an ascii numeric value. 
  534.                SIGN    Return ascii numeric values as signed.  The NUM Flag 
  535.                must be also set. 
  536.                PARSE   Return each byte in its own REXX stem variable. 
  537.                PAUSE   Rexx Dialog's device reading pauses after returning each 
  538.                block to the script.  It will not read the next block until the 
  539.                script performs a RESUME operation.  This allows the script to 
  540.                start/stop the device reads at will, thereby preventing Rexx 
  541.                Dialog from reading input faster than the script can handle it. 
  542.                WATCH   Return input as soon as one of the start patterns is 
  543.                matched.  End patterns are ignored (as is all input except for 
  544.                an exact match to one of the start patterns). 
  545.                PARTIAL  Some drivers do not block reads.  That is to say that 
  546.                if there is no more input to be read, the driver indicates that 
  547.                to Rexx Dialog.  For example, COM drivers support setting up 
  548.                reads to have a time-out (via an IOCTL interface), in which case 
  549.                if there is no more data to be read, control is returned to Rexx 
  550.                Dialog.  In this case, setting the PARTIAL Flag will cause Rexx 
  551.                Dialog to return (to your script) whatever data it has collected 
  552.                up to the point when no more data is available, even though an 
  553.                end pattern may not be matched (ie, RXENDPAT=0) or the count 
  554.                limit has not been met.  In other words, Rexx Dialog always ends 
  555.                up returning input data back to your script as soon as that data 
  556.                is available from the device, rather than waiting to fulfill the 
  557.                count limit or finding a matching end pattern before returning a 
  558.                data block. 
  559.  
  560. COUNT          This operation sets a new count limit for the specified device. 
  561.                The input buffer size can't be altered after INIT.  The Value 
  562.                arg is the new count limit (which should be at least 4 bytes 
  563.                less than the input buffer size). 
  564.  
  565. VAR            This operation sets a new REXX stem variable name to return 
  566.                input for the specified device.  The Value arg is the new 
  567.                variable name. 
  568.  
  569. START          This operation sets a new start string for the specified device. 
  570.                The Value arg is the new start string (expressed in the same 
  571.                format as per the INIT operation). 
  572.  
  573. END            This operation sets a new end string for the specified device. 
  574.                The Value arg is the new end string (expressed in the same 
  575.                format as per the INIT operation). 
  576.  
  577. FLAGS          This operation sets the new Flags for the specified device.  The 
  578.                Value arg is the new Flags (expressed in the same manner as per 
  579.                the INIT operation). 
  580.  
  581. RESUME         This operation tells Rexx Dialog to read another block of data 
  582.                for the specified device.  There is no Value arg.  You must do a 
  583.                RESUME Operation each time after RXDLG returns device input if 
  584.                you wish to receive another block of data upon the next RXDLG 
  585.                call.  Otherwise, device reading is paused. 
  586.  
  587. CLOSE          This operation closes the file handle for the specified device, 
  588.                and frees any resources allocated for it.  There is no Value 
  589.                arg.  After a CLOSE operation, you do not need to FILEREXX 
  590.                FileClose any handle that was setup on the INIT operation. 
  591.                Neither can you subsequently use that same handle with other 
  592.                FILEREXX routines.  (You'd have to FileOpen the device again). 
  593.  
  594. Returns 
  595.  
  596. A large variety of error messages or numbers could be returned by RXDLG.  See 
  597. Errors for details. 
  598.  
  599. The actual device input is returned upon a call to RXDLG.  RXDLG will setup the 
  600. REXX stem variable you specified during INIT (or VAR) with the device input. 
  601. RXWIND will be set to the DeviceName of the device whose input is being 
  602. returned.  RXID will be 1000 + the device number (where the first device 
  603. initialized is 0, the second device initialized is 1, etc).  So, you can either 
  604. use RXWIND or RXID to differentiate between RXDLG returning device input, or 
  605. some user input.  RXSUBID will be set to how many input bytes are being 
  606. returned.  RXSTARTPAT will be set to the number of whichever start pattern 
  607. matched the input (where the first start pattern is 1, the second pattern is 2, 
  608. etc).  RXSTARTPAT is 0 if no pattern was matched (ie, there was no start string 
  609. specified).  RXENDPAT will be set to the number of whichever end pattern 
  610. matched the input.  RXENDPAT is 0 if no pattern was matched (ie, there was no 
  611. end string specified or the count limit was reached before a matching end 
  612. pattern could be detected). 
  613.  
  614.  
  615. ΓòÉΓòÉΓòÉ 6.3. RXDLG ΓòÉΓòÉΓòÉ
  616.  
  617. Template       RXDLG NumGroups WindowTitle Dimensions Flags 
  618.                RXDLG WindowTitle Operation 
  619.  
  620. Description    This command is the major function that is used to create and 
  621.                manage the PM Interface.  It creates, manages, and finally 
  622.                destroys a window which can contain many different kinds of PM 
  623.                controls such as push buttons, radio buttons, checkmark buttons, 
  624.                result buttons, list boxes, drop boxes, entry boxes, sliders, 
  625.                menus, etc) that the user manipulates in order to enter data, or 
  626.                which your script uses to display data.  RXDLG has 2 different 
  627.                calling templates.  The first is used when you want to create a 
  628.                window.  The second template is used when you want to perform 
  629.                user input or output with, or perform some other operation such 
  630.                as destroying, a window.  RXDLG also returns device input (if 
  631.                you've opened a device for reading).  RXDLG can be called many 
  632.                times to create multiple windows, each with their own (perhaps 
  633.                unique) Groups of controls; all managed by a collaborative 
  634.                communication between Rexx Dialog and your script (mostly using 
  635.                RXDLG). 
  636.  
  637.                RXDLG requires that you set up various REXX Variables to 
  638.                describe all of the controls/menus/etc that you want within a 
  639.                particular window prior to issuing a RXDLG command to create a 
  640.                window.  Rexx Dialog then queries the state of those REXX 
  641.                variables on its own, and creates your window.  Subsequent calls 
  642.                to RXDLG can perform some other operation upon an open window 
  643.                that your script specifies. 
  644.  
  645.                RXDLG is a very complex command, so the next sections deal with 
  646.                various topics that concern RXDLG.  This page simply gives a 
  647.                brief, reference summary.  You may wish to skip to the next page 
  648.                now, and use this page simply as a reference after becoming 
  649.                familiar with RXDLG. 
  650.  
  651.                Note:  Rexx Dialog assumes that the system font has a point size 
  652.                       of 10 (ie, as does the default System Proportional).
  653.  
  654. Args 
  655.  
  656. NumGroups      How many Groups of controls are described.  For example, if you 
  657.                specify 2 Groups, then you need to set up two sets of variables 
  658.                for 2 Groups (ie, RXVAL.1, RXINFO.1, RXLABEL.1, etc, for the 
  659.                first Group, and RXVAL.2, RXINFO.2, RXLABEL.2, etc, for the 
  660.                second Group) or RXDLG will fail to create the window and return 
  661.                an error message.  Note that if you were to describe two Groups, 
  662.                but only passed a NumGroups of 1 to RXDLG, then a window would 
  663.                be created with only 1 Group in it.  You'd never see that second 
  664.                Group that you specified.  Make sure that NumGroups is set 
  665.                respective to how many sets of variables (ie, Groups of 
  666.                controls) that you've described, and vice versa. 
  667.  
  668.                Only the first 127 Groups in a window can have groupboxes 
  669.                automatically created around them (if desired).  For subsequent 
  670.                Groups, you'll have to use separate GROUP Types to encompass the 
  671.                desired controls. 
  672.  
  673.                Note:  If you don't supply a NumGroups arg, then Rexx Dialog 
  674.                       automatically knows that you're using the second template 
  675.                       of RXDLG (ie, where the WindowTitle comes first).  In 
  676.                       this case, you're not creating a window, but rather, 
  677.                       performing an operation upon an already open Window.
  678.  
  679.                In order to create a window, NumGroups must not be 0 (ie, you 
  680.                always have to specify at least 1 Group of controls).  If you 
  681.                truly want an "empty" window, then specify an empty MENU Group. 
  682.  
  683. WindowTitle    The title (ie, string) of the window.  If there are blank spaces 
  684.                in the title, then enclose the string with two pairs of quotes 
  685.                '"' (or "'") if the title is a variable, or '" and "' (or "' and 
  686.                '") if a literal string.  For example, these are legal titles: 
  687.  
  688.                '"'title'"'  /* title would be some variable that you 
  689.                initialized earlier, for example, title='My Window Title' */ 
  690.                '"My Window Title"' 
  691.  
  692.                Note:  You must not name a window where the first character is a 
  693.                       numeric digit (ie, 0 to 9) although numeric digits can 
  694.                       appear later in the title.
  695.  
  696.                If you're using the first RXDLG template, then a window will be 
  697.                created with this title. 
  698.  
  699.                If you're using the second RXDLG template, then WindowTitle is 
  700.                the title of the window upon which you wish to perform an 
  701.                operation.  In the second template, the WindowTitle can be an 
  702.                empty string, ie '""', in which case, the Main Window is used 
  703.                for Operations 2, 3, and 4, and for Operations 0 and 1, an empty 
  704.                string allows user interaction to resume with the window that 
  705.                was active upon the previous call to RXDLG.  The WindowTitle 
  706.                that you pass must match the title of some open window, or RXDLG 
  707.                will return a "Can't find Rexx Dialog" error message.  (If you 
  708.                pass an empty string, then the Main Window must be open). 
  709.  
  710.                Note:  If you specify a particular window title for Operations 0 
  711.                       or 1, that window will be brought to the front and made active.
  712.  
  713. Operation      This arg is for the second template of RXDLG.  Operation will be 
  714.                one of the following: 
  715.  
  716. 0              Perform user interaction (only upon the specified window if its 
  717.                MODAL flag is set).  Note that if there are multiple windows 
  718.                open and the specified window is not MODAL, then the user may 
  719.                choose to interact with a different window which may cause RXDLG 
  720.                to return.  In such a case, you should always check the RXWIND 
  721.                variable after a call to RXDLG. 
  722.  
  723. 1              Perform user interaction (only upon the specified window if its 
  724.                MODAL flag is set), and also tell Rexx Dialog that it's OK to 
  725.                close that window when RXDLG returns.  Note that if there are 
  726.                multiple windows open and the specified window is not MODAL, 
  727.                then the user may choose to interact with a different window 
  728.                which causes RXDLG to return.  In such a case, the specified 
  729.                window will not be closed, and you should always check the 
  730.                RXWIND variable after a call to RXDLG. 
  731.  
  732. 2              Set up the REXX return values as per the state of the specified 
  733.                window and return immediately without performing any user 
  734.                interaction nor window closing.  This operation does not set up 
  735.                the RXID, RXSUBID, and RXWIND variables. 
  736.  
  737. 3              Set up the REXX return values as per the state of the specified 
  738.                window, close that window, and return immediately without 
  739.                performing any user interaction.  This operation does not set up 
  740.                the RXID, RXSUBID, and RXWIND variables. 
  741.  
  742. 4              Close the specified window, and return immediately without 
  743.                performing any user interaction.  Do not set up the REXX return 
  744.                values as per the state of that window.  If you want to close 
  745.                all open windows, including the Main Window, then pass a 
  746.                WindowTitle arg of '""' (ie, two double quotes inside of two 
  747.                single quotes). 
  748.  
  749. 255            Clear out the PM message queue without performing any user 
  750.                interaction nor closing any windows nor setting up any REXX 
  751.                variables.  This is just to prevent PM lockups if you have 
  752.                windows open, and your script is not "sleeping" (ie, doing some 
  753.                call to RXDLG that performs user interaction). 
  754.  
  755. Dimensions     The name of a REXX variable that is a string containing the 
  756.                desired Width, Height, X Position, and Y Position of the window. 
  757.                These are measured in screen pixels.  X and Y positions are 
  758.                referenced to the bottom left corner of the Desktop if the 
  759.                window is a Main Window (ie, the very first window that you 
  760.                create upon the Desktop).  For example, specifying X and Y of 0 
  761.                means that the Main Window opens at the bottom left corner of 
  762.                the Desktop.  All other windows that you create after the Main 
  763.                Window are Child Dialogs, and their X and Y positions are 
  764.                referenced to the bottom left corner of the Main Window (as 
  765.                opposed to the Desktop itself).  For example, specifying X and Y 
  766.                of 0 means that the Child Dialog opens at the bottom left corner 
  767.                of the Main Window (ie, inside of the Main Window itself). 
  768.                Specifying a Width of 0 means that you want Rexx Dialog to 
  769.                determine a default size and position for the window (and the 
  770.                Height, X, and Y are ignored).  In this case, you also get a 
  771.                window that can be resized and maximized, and so the SIZE flag 
  772.                is redundant.  For example, if you wanted a window with 
  773.                Width=300, Height=200, X=10, and Y=10, then setup a variable 
  774.                with these values enclosed in quotes, and pass the name of that 
  775.                variable as the Dimensions arg: 
  776.  
  777.                Note:  Whenever Rexx Dialog closes a window, it updates the 
  778.                       Dimensions string for that window.  This is handy if you 
  779.                       want to reopen the window later.  If you pass the same 
  780.                       Dimensions string to RXDLG (without reinitializing it), 
  781.                       then the window will open with the same size and position 
  782.                       as it had when it was closed.  Rexx Dialog also updates a 
  783.                       window's Dimensions string if you specify that window in 
  784.                       Operations 2, 3, or 4.
  785.  
  786.                MyWinDimensions = '300 200 10 10' 
  787.                RXDLG 1 '"My Window Title"' 'MyWinDimensions' 
  788.  
  789.                The variable containing the dimensions can be any legal variable 
  790.                name that you wish. 
  791.  
  792. Flags          A string that describes the various display and management 
  793.                options for the window.  You can specify any or all of these 
  794.                Flags, and each one must be separated by a | character, enclosed 
  795.                in quotes.  The various Flags are: 
  796.  
  797. SIZE           You want a window that can be resized by the user (ie, has a 
  798.                border that he can grab with the mouse and move to resize the 
  799.                window).  The window will also have a maximize/restore button in 
  800.                the titlebar. 
  801.  
  802. MIN            You want a window that can be minimized by the user.  Main 
  803.                Windows are always created with a minimize button in the 
  804.                titlebar, and this flag need not be specified.  A Main Window 
  805.                minimizes into an icon on the bottom of the Desktop.  If a Child 
  806.                Dialog has a minimize control, it doesn't minimize to the bottom 
  807.                of the Desktop, but rather, the bottom left of the Main Window. 
  808.                (Be careful to not place controls there in the Main Window, or 
  809.                the child window will fall behind them). 
  810.  
  811. SMALL          When a window is first created, it starts out minimized.  The 
  812.                MIN Flag must also be set. 
  813.  
  814. MODAL          When the window is created or when performing an operation upon 
  815.                it, all other Child Dialogs and controls in the Main Window are 
  816.                disabled. 
  817.  
  818.                Note:  A Main Window cannot be created MODAL.  The MODAL Flag is 
  819.                       ignored in this case.
  820.  
  821. NOCLOSE        When a call to RXDLG returns as a result of the user doing 
  822.                something with this window, Rexx Dialog automatically closes 
  823.                this window.  NOCLOSE simply is a way of telling Rexx Dialog to 
  824.                close a window when it causes RXDLG to return, so that your 
  825.                script doesn't have to perform that extra operation (which would 
  826.                be done if the window was a one-shot type of deal, ie, where you 
  827.                wanted to get a set of data from the user once, and then dismiss 
  828.                the window). 
  829.  
  830.                Whenever the Main Window is closed, either automatically due to 
  831.                not specifying NOCLOSE, or by doing an operation upon the Main 
  832.                Window which causes it to close, all Child Dialogs are also 
  833.                automatically closed. 
  834.  
  835.                Note:  All windows have a CLOSE ICON (ie, on the left side of 
  836.                       the titlebar).  RXDLG always returns when a user clicks 
  837.                       upon a CLOSE ICON (with RXID = -98).  But a window is not 
  838.                       closed if the NOCLOSE Flag is specified.  If you specify 
  839.                       NOCLOSE, your script always has to eventually perform an 
  840.                       END operation upon a particular window in order to close 
  841.                       it (although if your script exits with any windows still 
  842.                       open, those windows are automatically closed).
  843.  
  844. RESULT         When the window has the focus, and the user presses the ESC or 
  845.                ENTER key, RXDLG returns control to your script (ie, your script 
  846.                "wakes up" from a call to RXDLG).  See ESC and ENTER Keys. 
  847.  
  848. KEYS           When the window has the focus, and the user presses some key 
  849.                combination, RXDLG returns control to your script (ie, your 
  850.                script "wakes up" from a call to RXDLG).  The RESULT Flag has 
  851.                precedence over KEYS (for ESC and ENTER), although both Flags 
  852.                can be set.  See Keyboard Input. 
  853.  
  854. ONCE           After the timer for the window times out, the timer is 
  855.                automatically disabled.  See Time-out. 
  856.  
  857. NEWSIZE        After the user resizes a window, the REXX script is notified of 
  858.                the new size.  See Resizing a window. 
  859.  
  860.                Here's an example of a Flags arg that might be passed to RXDLG: 
  861.  
  862.                'SIZE|MODAL|MIN' 
  863.  
  864.                Of course, you could also use a variable: 
  865.  
  866.                myflags = 'SIZE|MODAL|MIN' 
  867.                RXDLG 1 '"My Window Title"' 'DIMENSIONS' myflags 
  868.  
  869.                If you don't specify a Flags arg, then none of the above flags 
  870.                are enabled (ie, you get a window that can't be sized, nor 
  871.                minimized if not a Main Window, nor maximized, is not modal, 
  872.                won't recognize the ESC and ENTER keys when that window is 
  873.                active to return from RXDLG, and when it does cause RXDLG to 
  874.                return, Rexx Dialog automatically closes the window. 
  875.  
  876.                Note:  It doesn't matter in what order you specify the Flags, 
  877.                       but each must be separated from another using a | character.
  878.  
  879. Returns 
  880.  
  881. A large variety of error messages or numbers could be returned by RXDLG.  See 
  882. Errors for details. 
  883.  
  884. Examples 
  885.  
  886. See the following sections. 
  887.  
  888.  
  889. ΓòÉΓòÉΓòÉ 6.3.1. Groups ΓòÉΓòÉΓòÉ
  890.  
  891. A PM control is some graphical object (inside of a window) which the user can 
  892. manipulate with the mouse or keyboard in order to enter data.  Controls can 
  893. also be used to display data to the user. 
  894.  
  895. Rexx Dialog arranges controls into Groups.  A Group is simply one or more 
  896. instances of the same type of PM control.  For example, you can have a Group of 
  897. 3 sliders.  Or you can have a Group of 2 list boxes.  Or you can have a Group 
  898. of 16 push buttons.  Etc.  Arranging similiar controls into Groups makes it 
  899. easier for your script to define many instances of the same type of control. 
  900. That's why I defined a Group.  Of course, you could have only 1 control per 
  901. each Group, but that sort of defeats the purpose of a Group.  How does Rexx 
  902. Dialog make it easier to define a Group of controls rather than 1 control at a 
  903. time?  One thing that Rexx Dialog does is intelligently arrange and space 
  904. controls in the window.  So, if you have a Group of 32 push buttons, you don't 
  905. have to specify the width, height, X and Y positions of each one (as well as 
  906. where to place and size the label of each button).  You simply tell Rexx Dialog 
  907. where the first button is located, how many buttons there are, how many buttons 
  908. should appear upon each line, and what the width of a button is.  Rexx Dialog 
  909. will take care of positioning and spacing the other 31 push buttons, and will 
  910. arrange them symmetrically.  Secondly, if you desire a group box (ie, a 
  911. rectangular border that surrounds all of the controls in the group, and which 
  912. has its own label), Rexx Dialog intelligently figures out how to size and 
  913. position that group box.  You merely have to specify the label for that group 
  914. box.  Also, you typically may want the same kind of behavior for all of the 
  915. same type of controls.  For example, maybe you want 10 list boxes, and you want 
  916. them all to be able to select multiple items in their lists.  You don't have to 
  917. specify that you want multiple select for each list box.  You simply define all 
  918. the list boxes within one group, and say that you want the group to be multiple 
  919. select.  Finally, Rexx Dialog allows you to apply certain types of editing or 
  920. initializing to an entire group.  For example, if you have 32 push buttons and 
  921. you want to clear the checkmarks of all of them, you simply say that you want 
  922. to clear the Group. 
  923.  
  924. Rexx Dialog doesn't limit you to only one Group within a window, nor one Group 
  925. Type within a window.  For example, you can have a Group of 3 sliders, and then 
  926. above them, in the same window, have a Group of list boxes.  As another 
  927. example, you can have a Group of list boxes that are multiple select, and in 
  928. the same window, have another Group of list boxes that are single select. 
  929.  
  930. Defining controls in Groups is an easy way to define lots of similiar controls. 
  931. But, because a Group can be merely 1 control, you can also have plenty of 
  932. flexibility on an individual control basis if need be.  Also, because you only 
  933. need specify the X and Y position of the entire Group (and Rexx Dialog does 
  934. positioning of individual controls), it's easy to change the position of 
  935. Grouped controls. 
  936.  
  937. There are several Types of Groups.  They are: 
  938.  
  939.    Push Button (PUSH) 
  940.    Radio Button (RADIO) 
  941.    Checkmark Button (CHECK) 
  942.    Result Button (RESULT) 
  943.    Entry (ENTRY) 
  944.    List Box (LIST) 
  945.    Drop Box (DROP) 
  946.    Spin Button (SPIN) 
  947.    Slider (SLIDER) 
  948.    Text (TEXT) 
  949.    Group Box (GROUP) 
  950.    Menu (MENU) 
  951.  
  952. Each Type has its own options (ie, Flags) and a particular way in which you 
  953. must setup REXX variables to define that Group. 
  954.  
  955. You must use particular REXX stem variables when you define the Groups in a 
  956. window.  These stem variables are: 
  957.  
  958.    RXTYPE 
  959.    RXX 
  960.    RXY 
  961.    RXFLAGS 
  962.    RXLABEL 
  963.    RXINFO 
  964.    RXVAL 
  965.  
  966. RXTYPE         The Group Type.  If you look at the above list of Types, you'll 
  967.                see the values for Type in parentheses.  So, to define a Spin 
  968.                Button Group, you would set RXTYPE to 'SPIN'. 
  969.  
  970. RXFLAGS        May be interpreted differently for various Types.  It describes 
  971.                particular behavior and display options you want for this Group. 
  972.                For example, a Group of list boxes may have RXFLAGS set to 
  973.                'INDEX|MULTIPLE'.  Each Group Type's Flags will be described 
  974.                further in later sections. 
  975.  
  976. RXLABEL        May also be interpreted a little differently for various Types, 
  977.                but for most Types, it is simply the Text Labels for all of the 
  978.                controls within the Group, and the Label for any group box which 
  979.                surrounds this Group.  It will be set to one string that 
  980.                contains the label for each control, starting with the first 
  981.                control, and each label is separated from the next by a | 
  982.                character.  The group box label will be last (if it is specified 
  983.                at all.  If not specified, then no group box is created around 
  984.                the controls).  For example, if you have 3 list boxes named 
  985.                "Fruits", "Vegetables", and "Meats" respectively, plus a 
  986.                surrounding group box labeled "Food Groups", then RXLABEL would 
  987.                be set to 'Fruits | Vegetables | Meats | Food Groups'. 
  988.  
  989.                Note:  You can omit or add blank spaces between the labels and | 
  990.                       character.  The above example could also be: 
  991.                       'Fruits|Vegetables|Meats|Food Groups' 
  992.                       or 
  993.                       '   Fruits   |  Vegetables  |    Meats   |  Food Groups' 
  994.                       with the same results.  Rexx Dialog trims leading and 
  995.                       trailing spaces off of each label.
  996.  
  997.                If a particular control is not to be labeled, then simply leave 
  998.                a blank space where its label would go.  For example, to create 
  999.                the "Meats" list box unlabeled, set RXLABEL to 'Fruits | 
  1000.                Vegetables | | Food Groups".  You can omit the spaces and it 
  1001.                becomes 'Fruits|Vegetables||Food Groups'.  If you don't want the 
  1002.                group box, simply omit its label, ie, 'Fruits|Vegetable|Meats'. 
  1003.                In fact, if you specify less labels than there are controls 
  1004.                within a Group, then the remaining controls are unlabeled.  For 
  1005.                example, to only label the first 2 list boxes, not label the 
  1006.                third one, and omit the group box, set RXINFO to 
  1007.                'Fruits|Vegetables'. 
  1008.  
  1009.                Placing a ~ character before any letter in the label causes that 
  1010.                letter to be underlined.  This is handy for identifying 
  1011.                "keyboard shortcuts" to the user (which your script will 
  1012.                implement using the window's KEYS Flag, and processing Keyboard 
  1013.                Input). 
  1014.  
  1015.                The first control in the group appears closest to the lower left 
  1016.                corner of the Desktop or Main Window.  This is how OS/2 defines 
  1017.                coordinates.  (I would have preferred a top-down approach). 
  1018.  
  1019. RXINFO         A string that may be interpreted differently for various Types, 
  1020.                but in some way, it describes how many controls are contained in 
  1021.                the Group.  It may also describe things like how wide (in 
  1022.                pixels) a control should be, how many controls should be placed 
  1023.                upon each line, and also any other information particular to a 
  1024.                certain Group Type.  For most all Group Types, the first 3 
  1025.                components in the RXINFO string are the number of controls in 
  1026.                the Group (ie, which I'll refer to as TotalControls), how many 
  1027.                controls appear per line (ControlsPerLine), and how wide a 
  1028.                control should be (WidthOfControl). (You only have to describe 
  1029.                the control height for certain Types. Most Types have a standard 
  1030.                height).  For some controls, such as PUSH, RESULT, CHECK, RADIO, 
  1031.                and TEXT, a width of 0 tells Rexx Dialog to calculate the best 
  1032.                fit.  How each Group Type utilizes RXINFO will be described 
  1033.                further in later sections. 
  1034.  
  1035. RXVAL          A string that may be interpreted differently for various Types, 
  1036.                but in some way, it initializes the values of the controls (ie, 
  1037.                it's either a string that contains the value of each control, or 
  1038.                contains the names of stem variables where Rexx Dialog finds the 
  1039.                values for the controls).  Rexx Dialog also uses the same RXVAL 
  1040.                to return the data that the user enters via the controls in that 
  1041.                Group.  How each Group Type utilizes RXVAL  will be described 
  1042.                further in later sections. 
  1043.  
  1044. RXX            The X position of the Group (ie, where along the X axis the 
  1045.                first control within the Group should be positioned in a 
  1046.                window).  This is measured relative to the lower left corner of 
  1047.                the Desktop (if a Main Window) or the Main Window's lower left 
  1048.                corner (if a Child Dialog).  In other words, this is how far 
  1049.                away from the left border of the Desktop or Main Window, you 
  1050.                want the Group of controls to be displayed.  If a group box is 
  1051.                to be included, move the group farther to the right in order to 
  1052.                make room for the box. 
  1053.  
  1054. RXY            The Y position of the Group (ie, where along the Y axis the 
  1055.                first control within the Group should be positioned in a 
  1056.                window).  This is measured relative to the lower left corner of 
  1057.                the Desktop (if a Main Window) or the Main Window's lower left 
  1058.                corner (if a Child Dialog).  In other words, this is how far up, 
  1059.                from the bottom border of the Desktop or Main Window, you want 
  1060.                the Group of controls to be displayed.  If a group box is to be 
  1061.                included, move the group up higher in order to make room for the 
  1062.                box. 
  1063.  
  1064. The stem on these variable names pertains to which Group you're defining. 
  1065. Don't get nervous.  I'm going to explain this.  Haven't I done OK so far? 
  1066.  
  1067. For example, let's say that you want a Group of 3 sliders, a Group of 2 spin 
  1068. buttons, and a Group of 4 push buttons in a window.  That's 3 Groups.  Let's 
  1069. say that you want the sliders to be Group 1, the spin buttons are Group 2, and 
  1070. the push buttons are Group 3. That means that, when you describe the slider 
  1071. group, the variables names that you use are RXTYPE.1, RXX.1, RXY.1, RXFLAGS.1, 
  1072. RXLABEL.1, RXINFO.1, and RXVAL.1.  When you describe the spin button group, the 
  1073. variables names that you use are RXTYPE.2, RXX.2, RXY.2, RXFLAGS.2, RXLABEL.2, 
  1074. RXINFO.2, and RXVAL.2.  When you describe the push button group, the variables 
  1075. names that you use are RXTYPE.3, RXX.3, RXY.3, RXFLAGS.3, RXLABEL.3, RXINFO.3, 
  1076. and RXVAL.3.  What variables would you use to describe a fourth Group of 
  1077. controls in the window?  Yep.  RXVAL.4, etc.  See, that wasn't so bad, was it? 
  1078.  
  1079. OK, now it's time for an example.  Let's implement the above example.  Don't 
  1080. worry about what the particular strings for RXVAL, RXINFO, and RXFLAGS mean for 
  1081. each Type.  Just note how I define the 3 Groups (which can be done in any 
  1082. order, or at any time as long as this is done before the call to RXDLG).  Pay 
  1083. attention to the commented lines. 
  1084.  
  1085. /* First Group (ie, the 3 sliders) */ 
  1086. RXTYPE.1 = 'SLIDER'  /* SLIDER Type */ 
  1087. RXFLAGS.1 = ' ' 
  1088. RXLABEL.1 = '128 255 Slider 1: | 64 0 Slider 2: | 128 0 Slider 3: | Slide Us' 
  1089. RXVAL.1 = '64 32' 
  1090. RXINFO.1 = '3 1 142'   /* TotalControls, ControlsPerLine, WidthOfControl */ 
  1091. RXX.1 = 80          /* X position of first control (ie, the Group) */ 
  1092. RXY.1 = 18          /* X position of first control (ie, the Group) */ 
  1093.  
  1094. /* Second Group (ie, the 2 spin buttons) */ 
  1095. RXTYPE.2 = 'SPIN'    /* SPIN Type */ 
  1096. RXFLAGS.2 = ' ' 
  1097. RXLABEL.2 = '128 0 Spin 1: | 64 0 Spin 2: | Spin Us' 
  1098. RXVAL.2 = '10 20' 
  1099. RXINFO.2 = '2 1 90'   /* TotalControls, ControlsPerLine, WidthOfControl */ 
  1100. RXX.2 = 320          /* X position of first control (ie, the Group) */ 
  1101. RXY.2 = 18          /* X position of first control (ie, the Group) */ 
  1102.  
  1103. /* Third Group (ie, the 4 push buttons) */ 
  1104. RXTYPE.3 = 'PUSH'    /* PUSH Type */ 
  1105. RXFLAGS.3 = ' ' 
  1106. RXLABEL.3 = 'Push 1 | Push 2 | Push 3 | Push Us' 
  1107. RXVAL.3 = '' 
  1108. RXINFO.3 = '3 3 0'    /* TotalControls, ControlsPerLine, WidthOfControl (best 
  1109. fit) */ 
  1110. RXX.3 = 90         /* X position of first control (ie, the Group) */ 
  1111. RXY.3 = 100        /* X position of first control (ie, the Group) */ 
  1112.  
  1113. /* Now that you've defined the 3 Groups, you can create a window containing 
  1114. them.  Let's call it "Main Window" (since it will be the first window that we 
  1115. open, and therefore, the Main Window).  Note that I specify NumGroups arg as 3 
  1116. */ 
  1117.  
  1118. windowSize = ''     /* Default */ 
  1119. RXDLG 3 '"Main Window"' 'windowSize' 'RESULT' 
  1120.  
  1121. /* After the window is created, you can DROP those REXX variables used for such 
  1122. if desired, in order to conserve memory. It's recommended that you leave RXVAL 
  1123. and all windows Dimensions strings. */ 
  1124. DROP RXTYPE. RXFLAGS. RXLABEL. RXINFO. RXX. RXY. 
  1125.  
  1126. /* Perform user interaction, such as wait for him to click the window CLOSE 
  1127. ICON */ 
  1128. RXDLG 
  1129.  
  1130. Copy the above example to a file and run it with RX.EXE. 
  1131.  
  1132. Note:  It doesn't matter in what order you assign the variables.  For example, 
  1133.        you can setup the variable RXINFO.1 before you setup RXTYPE.1.  The only 
  1134.        important consideration is setting up all variables before the call to RXDLG.
  1135.  
  1136.  
  1137. ΓòÉΓòÉΓòÉ 6.3.2. Managing a PM Interface ΓòÉΓòÉΓòÉ
  1138.  
  1139. In order to interact with the user (ie, get input from him and display output 
  1140. to him), your script will need to use one or more PM windows (with PM controls 
  1141. inside of them). 
  1142.  
  1143. To create a window, you use the first template of RXDLG.  Call RXDLG with the 
  1144. NumGroups parameter greater than 0 (ie, you always have to specify at least 1 
  1145. Group of controls).  This tells RXDLG that you wish to create a window with 
  1146. that many Groups of controls inside of it.  RXDLG will query all of the 
  1147. variables that your script setup in order to create, initialize, and display 
  1148. that window and its controls.  If this is the first window to be displayed, it 
  1149. becomes the Main Window and all other windows (ie, Child Dialogs) open inside 
  1150. of this window.  The window is given the title that you specified to RXDLG. 
  1151.  
  1152. Note:  Each window should have a distinct title.
  1153.  
  1154. After RXDLG creates the window, it will return immediately.  Although the 
  1155. window is displayed, the user will not be able to interact with it yet.  At 
  1156. that point, you can do further initialization if desired.  One thing that you 
  1157. can do is call RXDLG again, using its first template, to create another window. 
  1158. You can have as many windows simultaneously open as desired (PM resources 
  1159. permitting), each containing its own (perhaps unique) Groups of controls. 
  1160.  
  1161. Then, you'll make one or more calls to RXDLG using the second template to 
  1162. manage the PM interface.  In the second template of RXDLG, you specify what 
  1163. operation you wish to perform on the PM interface, where such operations 
  1164. include allowing the user to interact with one or all open windows and perhaps 
  1165. return user input to the script, and eventually closing down windows. 
  1166.  
  1167. The following discussion is for RXDLG Operations that perform user interaction 
  1168. (ie, 0 and 1), and may not pertain to other RXDLG Operations. 
  1169.  
  1170. When you perform an RXDLG Operation that allows the user to interact with the 
  1171. windows (and the PM controls within them), RXDLG does not return immediately. 
  1172. Instead, your script "goes to sleep" while Rexx Dialog manages the user's 
  1173. interaction and all of the PM processing associated with that.  In other words, 
  1174. while the user is interacting with the windows\controls, your script is locked 
  1175. inside of that call to RXDLG.  (The exception to this is RXDLG Operations that 
  1176. don't perform user interaction, such as operations 2, 3, 4, and 255).  When 
  1177. RXDLG returns control to your script, then the user can't interact with the 
  1178. windows anymore (until you again call RXDLG to perform an Operation that allows 
  1179. the user to interact with the windows\controls).  So, think of RXDLG as a way 
  1180. for you to pass control to Rexx Dialog (and the user).  When RXDLG returns, it 
  1181. is passing control back to your script (and away from the user). 
  1182.  
  1183. While Rexx Dialog has control, the user is free to manipulate the windows (and 
  1184. controls within them) in any order that he wishes.  (The exception to this is 
  1185. for a window with its MODAL Flag set).  For example, if there are 3 windows 
  1186. open, the user can click upon any one of them to make it the active window, and 
  1187. then activate any control inside of that window.  Therefore, your script can 
  1188. never make any assumptions about which window and control the user has 
  1189. manipulated.  Instead, Rexx Dialog will keep track of that information, and 
  1190. sets some REXX variables in your script which you can then examine (after RXDLG 
  1191. returns) to determine which window and control has been manipulated. 
  1192.  
  1193. There are a number of actions the user could do which would cause RXDLG to 
  1194. return (ie, and therefore return control to your script).  They are: 
  1195.  
  1196.  1. If the script is launched by some application other than RX.EXE, and that 
  1197.     app wants the script to abort (ie, EXIT). 
  1198.  
  1199.  2. He clicks upon the CLOSE ICON of a window. 
  1200.  
  1201.  3. If the window's RESULT Flag is set, and the window itself has the focus 
  1202.     (ie, the window is active, but no control within it is activated), he 
  1203.     presses the ESC key. 
  1204.  
  1205.  4. If the window's RESULT Flag is set, and the window itself has the focus, he 
  1206.     presses the ENTER key. 
  1207.  
  1208.  5. The window's timeout is enabled, and the timeout expires. 
  1209.  
  1210.  6. If the window's KEYS Flag is set, and the window itself has the focus, he 
  1211.     presses some key on the computer's keyboard. 
  1212.  
  1213.  7. He clicks upon some button in a RESULT Group. 
  1214.  
  1215.  8. He finishes using some control that is in a Group with its END Flag set. 
  1216.  
  1217. Before RXDLG returns control to your script, it sets up all returned variables 
  1218. (ie, RXVAL, RXWIND, RXID, RXSUBID, the window's Dimensions string, etc) per the 
  1219. state of this window (and its Groups). (The exception to this is RXDLG 
  1220. Operations that specifically don't want the return values setup, such as 
  1221. operation 4).  RXDLG will also close the window that caused the return unless 
  1222. the window's NOCLOSE Flag is set.  (The exception to this is with KEYS 
  1223. processing.  Although RXDLG returns control to your script when the user 
  1224. presses a key, the window is not closed, and only the variables RXID, RXSUBID, 
  1225. and RXWIND are setup.  Another exception is for action #1, an app indicating to 
  1226. abort.  In this case, only RXWIND, RXID, and RXSUBID are setup). 
  1227.  
  1228. If the user was able to interact with more than one window during the call to 
  1229. RXDLG, then your script needs to examine the RXWIND variable.  This is set to 
  1230. the title of the window which caused RXDLG to return.  Typically, each window 
  1231. would be associated with some operation that your script performs.  You'd do a 
  1232. SELECT on RXWIND, comparing it to the titles of all of your windows, and when 
  1233. you found the match, you'd carry out the operation associated with that window. 
  1234.  
  1235. There are 2 variables that let you determine exactly what the user did to cause 
  1236. RXDLG to return (from the above list).  Those variables are RXID and RXSUBID. 
  1237. First, you examine RXID.  If the user manipulated some control in the window, 
  1238. then RXID is set to the Group number that control is within (where the first 
  1239. Group is number 1).  For example, if the first Group in the window contains 5 
  1240. PUSH buttons, and the user pressed one of those buttons, then RXID will be 1 to 
  1241. indicate that he used a control in Group 1.  (This assumes that the Group has 
  1242. its END Flag set so that it causes RXDLG to return).  RXSUBID is set to the 
  1243. control number that was manipulated in that Group (where the first control is 
  1244. number 1).  Let's say that he pushed the third button in that Group.  RXSUBID 
  1245. will be 3. 
  1246.  
  1247. If RXID is 0 or some negative number, this indicates that what caused RXDLG to 
  1248. return wasn't due to the user manipulating some control within a Group, but 
  1249. rather, one of the first 6 actions listed above occurred.  Both RXID and 
  1250. RXSUBID are 0 if a timeout occurred (ie, the window timer timed out before any 
  1251. of the other 6 actions could occur).  RXID will be -98 if the window's CLOSE 
  1252. ICON was clicked.  RXID will be -12 if the ESC key was pressed. RXID will be 
  1253. -20 if the window was resized (and you specified the NEWSIZE Flag).  If the 
  1254. script is launched by some application other than RX.EXE (the app must be 
  1255. written to specifically use RXDLG.DLL), and that app wants the script to abort 
  1256. (ie, EXIT), then RXID will be -99.  If the user pressed some other key on the 
  1257. keyboard, RXID will be between 0 and -11 (depending upon whether the ALT, 
  1258. SHIFT, and\or CTRL keys were held down too, and whether the key is a printable 
  1259. character such as "s" or unprintable such as the HOME key), and RXSUBID will 
  1260. identify that particular key (as described in Keyboard Input). 
  1261.  
  1262. Based upon RXWIND, RXID, and RXSUBID, your script will decide what operation it 
  1263. wishes to perform (perhaps using the other REXX variables which were setup to 
  1264. the "values" of all of the controls in the window specified by RXWIND).  It's 
  1265. possible that this operation could involve opening more windows and getting 
  1266. even more user input.  After this operation is complete, the script will either 
  1267. terminate, or loop back to calling RXDLG to do some more user interaction (ie, 
  1268. if you want to give the user an opportunity to repeat an operation with a new 
  1269. set of input). 
  1270.  
  1271. If the script does continually loop around, getting new sets of user input, 
  1272. you'll need a method of breaking out of the loop and exiting from your REXX 
  1273. script.  Typical ways include checking if the user has clicked upon the Main 
  1274. Window's CLOSE ICON, checking if the user has selected a "Quit" menu label (if 
  1275. you add such to the window), or checking if the user has pressed the ESC key 
  1276. (or pressed some key combo, or manipulated some control, that you have deemed 
  1277. will be interpreted as a signal to quit the program).  If your script is 
  1278. launched by some app other than RX.EXE, you'll also want to check for a signal 
  1279. to abort. 
  1280.  
  1281. Refer to the RXDLG section for details on the args passed to RXDLG. 
  1282.  
  1283.  
  1284. ΓòÉΓòÉΓòÉ 6.3.3. Group Types ΓòÉΓòÉΓòÉ
  1285.  
  1286. The next sections explain the details about each Group Type (ie, and offer a 
  1287. detailed explanation of some of the variables mentioned in Groups, which can be 
  1288. interpreted differently for each Group). 
  1289.  
  1290.  
  1291. ΓòÉΓòÉΓòÉ 6.3.3.1. Push Button ΓòÉΓòÉΓòÉ
  1292.  
  1293. Type           PUSH 
  1294.  
  1295. Description    A push button is a graphical, square button with the label 
  1296.                inside of the button itself. 
  1297.  
  1298.                A user can move the mouse pointer over the button and press (and 
  1299.                hold down) the mouse button.  The button will visually depress 
  1300.                as if the mouse pointer were a finger pushing down upon the 
  1301.                button.  When the user releases the mouse button, so too does 
  1302.                the mouse release the push button, and that's when it becomes 
  1303.                activated (ie, like a "momentary switch").  Alternately, 
  1304.                pressing the SPACE BAR will activate the button which currently 
  1305.                has the focus (ie, is highlighted). 
  1306.  
  1307.                When the user activates a push button, RXDLG returns if the END 
  1308.                Flag for its Group is specified. 
  1309.  
  1310.                There are a maximum of 32 buttons per Group. 
  1311.  
  1312. Uses           Push buttons are usually used to launch operations, such as to 
  1313.                begin a file save or load, or initiate an action such as to 
  1314.                create another window. 
  1315.  
  1316. REXX Setup 
  1317.  
  1318. RXINFO is a string specifying the TotalControls, ControlsPerLine, and 
  1319. WidthOfControl.  If WidthOfControl is 0, then Rexx Dialog calculates a "best 
  1320. fit".  If you specify a non-zero width, make sure that it is large enough or 
  1321. the button's label will be visually clipped. 
  1322.  
  1323. RXLABEL is as described in Groups.  But, if a Label for a particular button is 
  1324. omitted, then that button is not placed upon the display, and its number is 
  1325. skipped.  In this way, you can determine how you want to number the buttons 
  1326. upon the display.  For example, let's say that you want 3 buttons on the 
  1327. display.  But, you want the first button (which we'll label as "One") to be #1, 
  1328. the second button ("Two") to actually count itself as #3, and the third button 
  1329. ("Three") to count itself as #5 (ie, you want to skip #2 and #4).  You would 
  1330. omit labels for buttons 2 and 4.  Therefore, RXLABEL would be 'One | | Two | | 
  1331. Three'.  In this way, the "values" of the second and third buttons are 3 and 5. 
  1332. Note that if you skip buttons, you still have to count them in RXINFO's 
  1333. TotalControls.  For example, here TotalControls would be 5 (ie, TotalControls 
  1334. reflects how many labels you supply, not how many buttons are displayed). 
  1335.  
  1336. Note:  OS/2 REXX appears to have a bug in it regarding null strings.  A null 
  1337.        string is supposed to simply be quotes without any characters in 
  1338.        between, but OS/2 REXX doesn't like this in assignments (ie, when you 
  1339.        assign a variable to be a null string).  It likes to see at least 1 
  1340.        character between the quotes.  So instead of myvar = '', use myvar = ' ' 
  1341.        whenever assigning a null string to a label variable (or any other 
  1342.        variable that specifies a string rather than a numeric value).
  1343.  
  1344. RXVAL is a string specifying which button is initially selected by default. 
  1345. For example, if the first button is to be selected, then RXVAL = '1'.  If you 
  1346. don't want any default selection, then set RXVAL to a null string (ie, '').  By 
  1347. doing the latter, you can examine the return that Rexx Dialog gives for this 
  1348. Group, and determine whether the user selected any button at all.  Note that 
  1349. you must consider any skipped values when specifying button numbers in the 
  1350. RXVAL string. 
  1351.  
  1352. RXFLAGS can be any, all, or none of the following: 
  1353.  
  1354. 'NUMBERED'     Rexx Dialog automatically labels the buttons with numbers, (ie, 
  1355.                the first button has a label of '1', the second button is '2', 
  1356.                etc).  Therefore, you don't have to specify any of the button 
  1357.                labels in RXLABEL.  RXLABEL will simply be the group box label 
  1358.                (or a null string if no group box is desired). 
  1359.  
  1360. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  1361.                the active dialog window, including this button group) when the 
  1362.                user selects one of the buttons in this group. 
  1363.  
  1364. REXX Return 
  1365.  
  1366. Rexx Dialog returns this Group's RXVAL variable set to which button was pushed. 
  1367. For example, if the second button was pushed, then RXVAL is set to '2'.  Note 
  1368. that if buttons were skipped, the numbering reflects that.  In the above 
  1369. example, if the user pushed the third button, it really has a value of 5 
  1370. (because 2 and 4 were skipped), and so RXVAL is set to '5'.  If you initially 
  1371. specified no default, and the user never pushed any button before the dialog 
  1372. window containing this group caused RXDLG to return, then RXVAL would be a null 
  1373. string. 
  1374.  
  1375. Examples 
  1376.  
  1377. /* This creates a window called "Push Stuff" containing 1 Group of 3 push 
  1378. buttons labeled "High", "Mid", "Low", with a group box labeled "Tone".  Each 
  1379. button appears upon its own line (ie, they are stacked in a column), ie, 
  1380. ControlsPerLine=1.  Rexx Dialog calculates a best fit for width of each button. 
  1381. Selecting one of the buttons in this Group causes RXDLG to return (and also 
  1382. causes the dialog containing these buttons to be destroyed if the dialog isn't 
  1383. NOCLOSE).  There is no initial default selection.  */ 
  1384.  
  1385. RXTYPE.1 = 'PUSH' 
  1386.  
  1387. /* Cause RXDLG to return */ 
  1388. RXFLAGS.1 = 'END' 
  1389.  
  1390. /* NumOfControls, ControlsPerLine, WidthOfControl */ 
  1391. RXINFO.1 = '3 1 0' 
  1392.  
  1393. /* Labels for buttons, and group box */ 
  1394. RXLABEL.1 = 'High|Mid|Low|Tone' 
  1395.  
  1396. /* No default */ 
  1397. RXVAL.1 = '' 
  1398.  
  1399. /* Position */ 
  1400. RXX.1 = 10 
  1401. RXY.1 = 10 
  1402.  
  1403. /* Create "Push Stuff" window */ 
  1404. RXDIM = '80 160 50 50' 
  1405. RXDLG 1 '"Push Stuff"' 'RXDIM' 'RESULT' 
  1406.  
  1407. /* Display the selection */ 
  1408. RXSAY 'Chose button #'RXVAL.1 
  1409.  
  1410.  
  1411. ΓòÉΓòÉΓòÉ 6.3.3.2. Radio Button ΓòÉΓòÉΓòÉ
  1412.  
  1413. Type           RADIO 
  1414.  
  1415. Description    A radio button is a graphical, round button that is filled in 
  1416.                with a different color depending upon whether the button is "on" 
  1417.                or "off".  The label is immediately to the right of the button. 
  1418.  
  1419.                A radio button's state turns "on", and stays "on", when the user 
  1420.                activates it.  Like the push button, the user activates a radio 
  1421.                button when he clicks the mouse upon it.  Alternately, pressing 
  1422.                the SPACE BAR will activate the button which currently has the 
  1423.                focus (ie, is highlighted). But, only one radio button in a 
  1424.                group can be activated (ie, turned "on") at any given moment. 
  1425.                When a particular radio button is activated, any other button 
  1426.                that was "on" is automatically turned off, and only the newly 
  1427.                activated button is turned "on".  In other words, only one 
  1428.                button is ever "on" at any given moment, and all others in the 
  1429.                Group are "off". 
  1430.  
  1431.                When the user activates a radio button, RXDLG returns if the END 
  1432.                Flag for its Group is specified. 
  1433.  
  1434.                There are a maximum of 32 buttons per Group. 
  1435.  
  1436. Uses           Radio buttons are used to allow the user to choose one (and only 
  1437.                one) item from several available choices. For example, there may 
  1438.                several radio buttons, each offering a different "paper size" 
  1439.                for a printing job, and the user must choose one size. 
  1440.  
  1441. REXX Setup 
  1442.  
  1443. Setup is exactly the same as per the Push Button Group. 
  1444.  
  1445. REXX Return 
  1446.  
  1447. Return is exactly the same as per the Push Button Group. 
  1448.  
  1449. Examples 
  1450.  
  1451. /* This creates a window called "Radio" containing 1 Group of 4 radio buttons. 
  1452. Rexx Dialog labels them with numbers (ie, 'NUMBERED' Flag), so RXLABEL is the 
  1453. group box label only.  There are 2 buttons per line.  We specify a width of 30. 
  1454. Selecting a button in this Group DOESN'T cause RXDLG to return because we 
  1455. didn't specify 'END' Flag.  When the Group first appears, button 3 is selected 
  1456. */ 
  1457.  
  1458. RXTYPE.1 = 'RADIO' 
  1459.  
  1460. /* Let Rexx Dialog label all of the buttons with numbers */ 
  1461. RXFLAGS.1 = 'NUMBERED' 
  1462.  
  1463. /* NumOfControls, ControlsPerLine, WidthOfControl */ 
  1464. RXINFO.1 = '4 2 30' 
  1465.  
  1466. /* Group box label */ 
  1467. RXLABEL.1 = 'Numbers' 
  1468.  
  1469. /* Default is button 3 */ 
  1470. RXVAL.1 = '3' 
  1471.  
  1472. /* Position */ 
  1473. RXX.1 = 10 
  1474. RXY.1 = 7 
  1475.  
  1476. /* Create "Radio" window */ 
  1477. RXDIM = '100 110 50 50' 
  1478. RXDLG 1 '"Radio"' 'RXDIM' 'RESULT' 
  1479.  
  1480. /* Display the selection */ 
  1481. RXSAY 'Chose button #'RXVAL.1 
  1482.  
  1483.  
  1484. ΓòÉΓòÉΓòÉ 6.3.3.3. Checkmark Button ΓòÉΓòÉΓòÉ
  1485.  
  1486. Type           CHECK 
  1487.  
  1488. Description    A checkmark button is a graphical, square button that is filled 
  1489.                in with a graphical checkmark depending upon whether the button 
  1490.                is "on" or "off".  The label is immediately to the right of the 
  1491.                button. 
  1492.  
  1493.                A checkmark button's state toggles between "on" and "off" each 
  1494.                time that the user activates it. (ie, If it's currently "off" 
  1495.                when he activates it, it turns "on" and stays "on", and vice 
  1496.                versa).  Like the push button, the user activates a checkmark 
  1497.                button when he clicks the mouse upon it.  Alternately, pressing 
  1498.                the SPACE BAR will activate the button which currently has the 
  1499.                focus (ie, is highlighted).  But, unlike radio buttons, each 
  1500.                checkmark's state is independent of the others in the Group. 
  1501.                So, all of them can be turned "on", or all of them can be turned 
  1502.                "off", or any combination inbetween. 
  1503.  
  1504.                When the user activates a checkmark button, RXDLG returns if the 
  1505.                END Flag for its Group is specified. 
  1506.  
  1507.                There are a maximum of 32 buttons per Group. 
  1508.  
  1509. Uses           Checkmark buttons are used to allow the user to choose any, all, 
  1510.                or no items from several available choices. For example, there 
  1511.                may several checkmark buttons, each offering a different style 
  1512.                for a font (ie, underlined, italic, boldface), and the user can 
  1513.                choose any/all/none of those choices to be applied to the font 
  1514.                simultaneously. 
  1515.  
  1516. REXX Setup 
  1517.  
  1518. Setup is exactly the same as per the Push Button Group, except that more than 
  1519. one button can be specified for the RXVAL string.  For example, if you want 
  1520. checkmark buttons 1, 4, and 6 checked initially, then set RXVAL to '1 4 6'.  It 
  1521. doesn't matter in which order you specify the selected buttons, so '6 4 1' 
  1522. would be the same as '1 6 4'. 
  1523.  
  1524. Also, RXFLAGS has one more option: 
  1525.  
  1526. ALLNONE        Two push buttons are displayed above all of the checkmark 
  1527.                buttons.  One push button is labeled "All".  If this is pushed, 
  1528.                it automatically forces all of the checkmark buttons to be 
  1529.                selected (ie, checked).  The other button is "None", and forces 
  1530.                all checkmark buttons to be deselected (ie, clears the checks). 
  1531.  
  1532. REXX Return 
  1533.  
  1534. Rexx Dialog returns this Group's RXVAL variable set to only those buttons that 
  1535. are checked (ie, selected).  For example, if the user selected buttons 4 and 5, 
  1536. then RXVAL is '4 5'.  The buttons are always ordered from lowest to highest 
  1537. numbers. 
  1538.  
  1539. Examples 
  1540.  
  1541. /* This creates a window called "Checks" containing a Group of 3 checkmarks 
  1542. labeled "Bold", "Italic", and "Underline", with no group box. There are 3 
  1543. buttons per line (so all 3 are on one line). We let Rexx Dialog calculate a 
  1544. best fit.  Selecting a button in this Group DOESN'T cause RXDLG to return 
  1545. because we didn't specify 'END' Flag.  When the Group first appears, buttons 1 
  1546. and 3 are selected.  There are also "All" and "None" push buttons */ 
  1547.  
  1548. RXTYPE.1 = 'CHECK' 
  1549.  
  1550. /* Add ALL\NONE push buttons */ 
  1551. RXFLAGS.1 = 'ALLNONE' 
  1552.  
  1553. /* NumOfControls, ControlsPerLine, WidthOfControl (best fit) */ 
  1554. RXINFO.1 = '3 3 0' 
  1555.  
  1556. /* Label for checkmarks, and group box */ 
  1557. RXLABEL.1 = 'Bold|Italic|Underline' 
  1558.  
  1559. /* Check buttons 1 and 3 */ 
  1560. RXVAL.1 = '1 3' 
  1561.  
  1562. /* Position */ 
  1563. RXX.1 = 7 
  1564. RXY.1 = 7 
  1565.  
  1566. /* Create "Checks" window */ 
  1567. RXDIM = '260 80 40 40' 
  1568. RXDLG 1 '"Checks"' 'RXDIM' 'RESULT' 
  1569.  
  1570. /* Display the selections (ie, more than 1 button can be selected. We need to 
  1571. parse the RXVAL string to remove each selected button number, and then we 
  1572. simply display its respective label */ 
  1573. DO UNTIL RXVAL.1 <= '' 
  1574.   PARSE VAR RXVAL.1 button RXVAL.1 
  1575.   IF button = 1 THEN RXSAY 'Chose Bold' 
  1576.   IF button = 2 THEN RXSAY 'Chose Italic' 
  1577.   IF button = 3 THEN RXSAY 'Chose Underline' 
  1578. END 
  1579.  
  1580.  
  1581. ΓòÉΓòÉΓòÉ 6.3.3.4. Result Button ΓòÉΓòÉΓòÉ
  1582.  
  1583. Type           RESULT 
  1584.  
  1585. Description    A result button is a special, preset collection of push buttons. 
  1586.                You have a choice of labeled buttons, including OK, CANCEL, YES, 
  1587.                NO, RETRY, IGNORE, ON, OFF, START, or STOP.  Any or all of these 
  1588.                buttons can be specified, and they are created upon one line. 
  1589.                When the user activates a result button, it always causes RXDLG 
  1590.                to return. 
  1591.  
  1592. Uses           Used mostly to end a dialog, after the user has set up all other 
  1593.                controls in the dialog window to desired values.  Depending upon 
  1594.                which one of the result buttons was selected, the script can 
  1595.                then perform an operation using the values of the dialog's 
  1596.                controls, or abort a pending operation. 
  1597.  
  1598. REXX Setup 
  1599.  
  1600. RXINFO is a string containing which preset buttons to display.  Here are the 
  1601. values for the available buttons: 
  1602.  
  1603. CANCEL    1 
  1604. OK       2 
  1605. NO       3 
  1606. YES      4 
  1607. ABORT     5 
  1608. RETRY     6 
  1609. IGNORE    7 
  1610. ENTER     8 
  1611. OFF       9 
  1612. ON       10 
  1613. STOP      11 
  1614. START     12 
  1615.  
  1616. For example, if you want the OK, CANCEL, and ABORT buttons, specify RXINFO is 
  1617. set to '1 2 5'.  It doesn't matter in what order you specify the button 
  1618. numbers. 
  1619.  
  1620. Note:  All of the buttons normally associated with "positive" responses are 
  1621.        even numbers.  All of the buttons normally associated with "negative" 
  1622.        response are odd numbers.  I refer to the positive buttons as SUCCESS 
  1623.        buttons, and the negative buttons as FAILURE buttons.
  1624.  
  1625. RXLABEL is the simply the group box label (or a null string if none). 
  1626.  
  1627. RXVAL need not be initialized. 
  1628.  
  1629. RXFLAGS can be any, all, or none of the following: 
  1630.  
  1631. 'BOOL'         Only return a 0 or 1.  If the user clicks upon one of the 
  1632.                SUCCESS buttons, return a 1.  If the user clicks upon one of the 
  1633.                FAILURE buttons, return a 0. 
  1634.  
  1635. Note:  It's not necessary to specify the 'END' Flag for a RESULT Group.  A 
  1636.        RESULT Group always causes RXDLG to return.
  1637.  
  1638. REXX Return 
  1639.  
  1640. Rexx Dialog returns this Group's RXVAL variable set to which button was pushed. 
  1641. For example, if the NO button was pushed, then RXVAL is set to '3' (unless BOOL 
  1642. Flag is specified, in which case RXVAL would be set to '0'). 
  1643.  
  1644. Note:  If a dialog is created with its RESULT Flag specified, when the user 
  1645.        presses ESC (while the dialog has the focus), any RESULTBUTTON has its 
  1646.        RXVAL return set to the lowest numbered FAILURE button in the Group. 
  1647.        For example, if you have a NO button in the Group, RXVAL is set to '3' 
  1648.        (unless BOOL Flag is specified).  When the user presses ENTER (while the 
  1649.        dialog has the focus), any RESULTBUTTON has its RXVAL return set to the 
  1650.        lowest numbered SUCCESS button in the Group.  For example, if you have 
  1651.        an OK button in the Group, RXVAL is set to '2' (unless BOOL Flag is 
  1652.        specified, in which case RXVAL is 1).
  1653.  
  1654. Examples 
  1655.  
  1656. /* This creates a window called "Result" containing a Result button Group with 
  1657. OK, CANCEL, and ABORT. There is no group box */ 
  1658.  
  1659. RXTYPE.1 = 'RESULT' 
  1660.  
  1661. /* Default */ 
  1662. RXFLAGS.1 = ' ' 
  1663.  
  1664. /* 1=OK, 2=CANCEL, 5=ABORT */ 
  1665. RXINFO.1 = '1 2 5' 
  1666.  
  1667. /* Group box label */ 
  1668. RXLABEL.1 = ' '  /* Leave a space. See note on REXX bug in "Groups" */ 
  1669.  
  1670. /* Position */ 
  1671. RXX.1 = 7 
  1672. RXY.1 = 7 
  1673.  
  1674. /* Create "Result" window */ 
  1675. RXDIM = '226 60 40 40' 
  1676. RXDLG 1 '"Result"' 'RXDIM' 'RESULT' 
  1677.  
  1678. /* Display the selection */ 
  1679. IF RXVAL.1 = 2 THEN RXSAY 'Pressed OK' 
  1680. IF RXVAL.1 = 1 THEN RXSAY 'Pressed CANCEL' 
  1681. IF RXVAL.1 = 5 THEN RXSAY 'Pressed ABORT' 
  1682.  
  1683.  
  1684. ΓòÉΓòÉΓòÉ 6.3.3.5. Entry ΓòÉΓòÉΓòÉ
  1685.  
  1686. Type           ENTRY 
  1687.  
  1688. Description    A box into which the user can type and edit (using the left and 
  1689.                right cursor, Delete, Insert, and Backspace keys) text, or which 
  1690.                can display text for the user to edit. 
  1691.  
  1692.                The user clicks inside of the box, and a cursor appears (ie, the 
  1693.                entry gets the focus).  He can then type keys and text will be 
  1694.                entered into the box.  When he presses the ENTER key, the text 
  1695.                is "accepted", and the entry will cause RXDLG to return if the 
  1696.                END Flag is set for this Group.  He can press the ESC key to 
  1697.                stop entering text into the entry (and return focus to the 
  1698.                dialog window). 
  1699.  
  1700. Uses           To obtain a line of text from the user, or present a line of 
  1701.                text to be edited by the user.  It could be used in the same way 
  1702.                that a REXX PULL statement would be used, except that a dialog 
  1703.                can contain many entries, so that the user can choose which ones 
  1704.                he wants to interact with, and which he doesn't. 
  1705.  
  1706. REXX Setup 
  1707.  
  1708. RXINFO is a string specifying the TotalControls, ControlsPerLine, and 
  1709. WidthOfControl.  WidthOfControl specifies only the size of the entry box (not 
  1710. any label for it too), and therefore will determine how many characters can be 
  1711. displayed in the entry box simultaneously.  If there are more characters in the 
  1712. line than can fit into the box, the user can press the right or left cursor 
  1713. keys to scroll other characters into view. 
  1714.  
  1715. RXLABEL is as described in Groups. 
  1716.  
  1717. RXVAL is a string specifying the name of a REXX stem variable where all of the 
  1718. initial contents of the entries are stored.  The variable name should be 
  1719. limited to 22 characters.  For example, if you set RXVAL to 'STRS', then the 
  1720. first entry in the Group will be initialized to whatever the value of STRS.1 is 
  1721. (ie, the string assigned to STRS.1 will be placed into the entry box when it is 
  1722. created, for the user to edit).  The second entry will be initialized to 
  1723. whatever the value of STRS.2 is.  Etc.  If you don't want any text initially 
  1724. placed into a particular entry (ie, you want it created empty), set its 
  1725. variable to a null string.  For example, if you wanted the second entry to be 
  1726. blank, assign STRS.2 = ' '. 
  1727.  
  1728. Note:  OS/2 REXX appears to have a bug in it regarding null strings.  A null 
  1729.        string is supposed to simply be quotes without any characters in 
  1730.        between, but OS/2 REXX doesn't like this in assignments (ie, when you 
  1731.        assign a variable to be a null string).  It likes to see at least 1 
  1732.        character between the quotes.  So instead of '', use ' ' whenever 
  1733.        assigning a null string to any variable that specifies a string rather 
  1734.        than a numeric value).
  1735.  
  1736. RXFLAGS can be any, all, or none of the following: 
  1737.  
  1738. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  1739.                the active dialog window, including this entry group) when the 
  1740.                ENTER key is pressed while one of the entries in this group has 
  1741.                the focus. 
  1742.  
  1743. RXX reflects the position of the first entry box, not its label (which needs 
  1744. room to the left of the entry in order to be displayed).  Therefore, set RXX 
  1745. far enough to the left to leave room for the label. 
  1746.  
  1747. REXX Return 
  1748.  
  1749. Rexx Dialog returns each entry's text in the same variable that was used to 
  1750. fetch its text.  In other words, if you specified RXVAL as 'STRS' when the 
  1751. Group was created, then the first entry's text is returned in STRS.1. 
  1752.  
  1753. Note:  Currently, an entry is limited to entering 31 characters maximum.  There 
  1754.        is a limit of 256 entries per Group, or if Labels are specified, 128 
  1755.        entries per Group.
  1756.  
  1757. Examples 
  1758.  
  1759. /* This creates a window called "Enter Stuff" containing a group of 3 entries 
  1760. with labels of "One", "Two", and "Three", and a groupbox of "All".  The first 
  1761. is initialized to contain "Hello", and the second and third are blank */ 
  1762.  
  1763. RXTYPE.1 = 'ENTRY' 
  1764.  
  1765. /* Default */ 
  1766. RXFLAGS.1 = ' ' 
  1767.  
  1768. /* Labels for each entry, and Groupbox */ 
  1769. RXLABEL.1 = 'One:|Two:|Three:|All' 
  1770.  
  1771. /* Variable name where the text "typed into" the entries is stored */ 
  1772. RXVAL.1 = 'TEXT' 
  1773.  
  1774. /* TotalControls, ControlsPerLine, WidthOfControls */ 
  1775. RXINFO.1 = '3 3 45' 
  1776.  
  1777. /* Position of Group */ 
  1778. RXX.1 = 60 
  1779. RXY.1 = 16 
  1780.  
  1781. /* The text for the 3 entries */ 
  1782. TEXT.1 = 'Hello' 
  1783. TEXT.2 = ' ' 
  1784. TEXT.3 = ' ' 
  1785.  
  1786. /* Create "Enter Stuff" window */ 
  1787. RXDIM = '256 106 20 20' 
  1788. RXDLG 1 '"Enter Stuff"' 'RXDIM' 'RESULT' 
  1789.  
  1790. /* Display the selection for each entry */ 
  1791. RXSAY 'Entry One is "'TEXT.1'"' 
  1792. RXSAY 'Entry Two is "'TEXT.2'"' 
  1793. RXSAY 'Entry Three is "'TEXT.3'"' 
  1794.  
  1795.  
  1796. ΓòÉΓòÉΓòÉ 6.3.3.6. List Box ΓòÉΓòÉΓòÉ
  1797.  
  1798. Type           LIST 
  1799.  
  1800. Description    A box containing numerous lines of text.  Each line is an "item" 
  1801.                that the user can select (ie, highlight).  There is a scroll bar 
  1802.                immediately to the right which, if there are more items than can 
  1803.                be simultaneously displayed in the box, can be used to scroll 
  1804.                those other items into view.  (The scroll bar is inoperable if 
  1805.                all of the items in the list can be simultaneously displayed in 
  1806.                the box).  The user can select an item by clicking upon it with 
  1807.                the mouse.  By holding the mouse button down, and moving the 
  1808.                mouse up and down, he can also scroll the list.  Alternately, 
  1809.                the up and down cursor keys can be used to cursor through the 
  1810.                list, and the ENTER key will select an item.  For multiple 
  1811.                select list boxes, more than one item can be selected 
  1812.                simultaneously.  When an item is selected, its state toggles. 
  1813.                (ie, If the item was not selected, selecting it highlights it. 
  1814.                If the item was highlighted, selecting it unhighlights, or 
  1815.                deselects it). 
  1816.  
  1817.                Clicking the mouse twice on an item very fast (ie, 
  1818.                double-clicking) causes RXDLG to return if the END Flag is set 
  1819.                for this control's group.  Alternately, pressing the ENTER key 
  1820.                does the same. 
  1821.  
  1822. Uses           List boxes are used to present items that a user can choose 
  1823.                from, much like checkmark or radio buttons, except that list 
  1824.                boxes use up less area if you have lots of items from which the 
  1825.                user can choose.  Multiple select lists function like 
  1826.                checkmarks, and single select lists function like radio buttons. 
  1827.  
  1828. REXX Setup 
  1829.  
  1830. RXINFO is a string specifying the TotalControls, ControlsPerLine, 
  1831. WidthOfControl, and NumVisibleItems.  WidthOfControl specifies the width of the 
  1832. list box, and therefore will determine how many characters of an item can be 
  1833. displayed in the list box.  NumVisibleItems determines how many items can be 
  1834. displayed simultaneously in the list box, and therefore this determines the 
  1835. height of the box. 
  1836.  
  1837. RXLABEL is as described in Groups. 
  1838.  
  1839. RXVAL is a string specifying the name of the REXX stem variables where all of 
  1840. the initial items of each list box are stored.  Each variable name should be 
  1841. limited to 22 characters.  Each list box has its own stem variable associated 
  1842. with it.  That stem variable contains all of the items that get added to that 
  1843. list box.  RXVAL specifies the REXX variable name for the first list box, then 
  1844. the REXX variable name for the second list box, then the REXX variable name for 
  1845. the third list box, etc.  Each list box's variable name is separated from the 
  1846. next by a | character.  For example, if you set RXVAL to 'ONE|TWO|THREE', then 
  1847. the first list box in the Group will be initialized to contain all of the items 
  1848. starting with ONE.1, the second list box will be initialized to contain all of 
  1849. the items starting with TWO.1, and the third list box will be initialized to 
  1850. contain all of the items starting with THREE.1.  Rexx Dialog reads items until 
  1851. it comes to an item that is a null string.  That marks the end of a list box's 
  1852. item.  For example, if you wanted to put 3 strings into the first list box; 
  1853. "Hello", "Hi", and 'Goodbye", then you would set ONE.1 to 'Hello', ONE.2 to 
  1854. 'Hi', and ONE.3 to to 'Goodbye'.  ONE.4 would be set to ' ' to mark the end of 
  1855. the list. 
  1856.  
  1857. Note:  OS/2 REXX appears to have a bug in it regarding null strings.  A null 
  1858.        string is supposed to simply be quotes without any characters in 
  1859.        between, but OS/2 REXX doesn't like this in assignments (ie, when you 
  1860.        assign a variable to be a null string).  It likes to see at least 1 
  1861.        character between the quotes.  So instead of '', use ' ' whenever 
  1862.        assigning a null string to any variable that specifies a string rather 
  1863.        than a numeric value).
  1864.  
  1865. RXFLAGS can be any, all, or none of the following: 
  1866.  
  1867. 'MULTIPLE'     Allows more than one item to be selected simultaneously (ie, 
  1868.                multiple select), rather than single select. 
  1869.  
  1870. ALLNONE        This is only applicable to a multiple select list box.  Two push 
  1871.                buttons are displayed above the list box.  One push button is 
  1872.                labeled "All".  If this is pushed, it automatically forces all 
  1873.                of the items in the list to be selected (ie, highlighted).  The 
  1874.                other button is "None", and forces all items to be deselected. 
  1875.                If the END Flag is also set for this Group, then RXDLG returns. 
  1876.                There is a limit of 40 list boxes per Group if the ALLNONE Flag 
  1877.                is used. 
  1878.  
  1879. INDEX          Instead of returning the actual text of an item when it is 
  1880.                selected, Rexx Dialog returns its index number (ie, where it 
  1881.                appears in the list).  The first item in the list has an index 
  1882.                of 0. 
  1883.  
  1884. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  1885.                the active dialog window, including this list box group) when an 
  1886.                item from a list is selected (or also unselected for multiple 
  1887.                select lists). 
  1888.  
  1889. REXX Return 
  1890.  
  1891. For single select list boxes, Rexx Dialog returns each list box's selected item 
  1892. in the same variable that was used to fetch its items, but with a .0 extension. 
  1893. Using the above example, the selected item for the first list box would be 
  1894. returned in ONE.0, the selected item for the second list box would be returned 
  1895. in TWO.0, and the selected item for the third list box would be returned in 
  1896. THREE.0. 
  1897.  
  1898. For multiple select list boxes, Rexx Dialog returns a count of how many items 
  1899. were selected in the list in the same variable that was used to fetch its 
  1900. items, but with a .0 extension.  Using the above example, the count for the 
  1901. first list box would be returned in ONE.0, the count for the second list box 
  1902. would be returned in TWO.0, and the count for the third list box would be 
  1903. returned in THREE.0.  The selections for each list box are then returned in 
  1904. compound variables (ie, a second extension is added to the variable name).  For 
  1905. example, the first selected item in the first list is returned in ONE.0.1, the 
  1906. second selected item in the first list is returned in ONE.0.2, etc.  The first 
  1907. selected item in the second list is returned in TWO.0.1, the second selected 
  1908. item in the second list is returned in TWO.0.2, etc. 
  1909.  
  1910. Note:  Currently, a list box item is limited to 31 characters maximum.  There 
  1911.        is a limit of 256 list boxes per group, or if Labels are specified, 128 
  1912.        list boxes per Group, or if ALL\NONE push buttons are included, 40 list 
  1913.        boxes per Group.
  1914.  
  1915. Examples 
  1916.  
  1917. /* This creates a window called "List Me" containing a Group of 1 single select 
  1918. list box with a label of "One", and a groupbox of "Choices".  The list box's 6 
  1919. items are stored in the ONE variable.  Those 6 items are "This is one", "This 
  1920. is two", "This is three", "This is four", "This is five", and "This is six". */ 
  1921.  
  1922. RXTYPE.1 = 'LIST' 
  1923.  
  1924. /* Default */ 
  1925. RXFLAGS.1 = ' ' 
  1926.  
  1927. /* Labels for each list box, and Groupbox */ 
  1928. RXLABEL.1 = 'One:|Choices' 
  1929.  
  1930. /* Variable names where the items are stored */ 
  1931. RXVAL.1 = 'ONE' 
  1932.  
  1933. /* TotalControls, ControlsPerLine, WidthOfControls, NumVisibleItems */ 
  1934. RXINFO.1 = '1 1 110 4' 
  1935.  
  1936. /* Position of Group */ 
  1937. RXX.1 = 10 
  1938. RXY.1 = 10 
  1939.  
  1940. /* The items for list 1 */ 
  1941. ONE.1 = 'This is one' 
  1942. ONE.2 = 'This is two' 
  1943. ONE.3 = 'This is three' 
  1944. ONE.4 = 'This is four' 
  1945. ONE.5 = 'This is five' 
  1946. ONE.6 = 'This is six' 
  1947. ONE.7 = ' '  /* End of List */ 
  1948.  
  1949. /* Create "List Me" window */ 
  1950. RXDIM = '140 146 30 30' 
  1951. RXDLG 1 '"List Me"' 'RXDIM' 'RESULT' 
  1952.  
  1953. /* Display the selection */ 
  1954. RXSAY 'Selection is "'ONE.0'"' 
  1955.  
  1956.  
  1957. ΓòÉΓòÉΓòÉ 6.3.3.7. Drop Box ΓòÉΓòÉΓòÉ
  1958.  
  1959. Type           DROP 
  1960.  
  1961. Description    A combination of an ENTRY and LIST.  The list is not visible 
  1962.                until you click the mouse upon a small arrow immediately to the 
  1963.                right of the entry.  Then, the list drops down, and the user can 
  1964.                manipulate it like a list.  Otherwise, if he clicks inside of 
  1965.                the entry box, he can then manipulate that part of it just like 
  1966.                an entry.  Whenever an item in the list is selected, it is 
  1967.                automatically copied to the entry. 
  1968.  
  1969.                Clicking the mouse on an item in the list causes RXDLG to return 
  1970.                if the END Flag is set for this control's group.  Also, pressing 
  1971.                the ENTER key does the same. 
  1972.  
  1973. Uses           Like a list box, this displays many choices to the user, but the 
  1974.                entry also gives him the opportunity to type in some text that 
  1975.                isn't currently in the list.  So, it might be used for a 
  1976.                situation where you want to present some default choices to the 
  1977.                user, but then allow him to reject those and specify his own 
  1978.                choice. 
  1979.  
  1980. REXX Setup 
  1981.  
  1982. RXINFO is a string specifying the TotalControls, ControlsPerLine, and 
  1983. WidthOfControl.  WidthOfControl specifies the width of the drop box, and 
  1984. therefore will determine how many characters of an item can be displayed in the 
  1985. drop box. 
  1986.  
  1987. RXVAL is exactly as in a List Box Group. 
  1988.  
  1989. RXLABEL is as described in Groups. 
  1990.  
  1991. RXFLAGS can be any, all, or none of the following: 
  1992.  
  1993. SHOWLIST       Instead of list box that drops down, the list box is always 
  1994.                visible.  In this case, the RXINFO must be setup like a list box 
  1995.                (ie, with a NumVisibleItems parameter too). 
  1996.  
  1997. READONLY       The user cannot type anything into the entry, but must select an 
  1998.                item for the list.  If READONLY is set, then SHOWLIST should not 
  1999.                be set (ie, if you don't want a drop down list and want it 
  2000.                readonly, just use a LIST Group). The real difference between a 
  2001.                READONLY DROP and a LIST is that the former takes up less area 
  2002.                because its list is only displayed when dropped down. 
  2003.  
  2004. INDEX          Instead of returning the actual text of a drop box item when it 
  2005.                is selected, Rexx Dialog returns its index number (ie, where it 
  2006.                appears in the list).  The first item in the list has an index 
  2007.                of 0. 
  2008.  
  2009. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  2010.                the active dialog window, including this drop box group) when an 
  2011.                item from a list is selected or user types into the entry and 
  2012.                presses ENTER. 
  2013.  
  2014. RXX and RXY reflect the position of the entry box of the first drop box, not 
  2015. its drop down list (which needs room beneath the entry in order to "drop 
  2016. down"), nor the drop box's label (which needs room to the left of the entry in 
  2017. order to be displayed).  Therefore, set RXX far enough to the left to leave 
  2018. room for the label, and set RXY far enough above the bottom border of the 
  2019. window in which the Group is placed in order for the drop boxes to have room to 
  2020. drop down.  The RXY variable should be 30 or more. 
  2021.  
  2022. REXX Return 
  2023.  
  2024. The return is exactly as in a single select List Box Group. 
  2025.  
  2026. Note:  Currently, a drop box is limited to 31 characters maximum.  There is a 
  2027.        limit of 256 drop boxes per Group, or if Labels are specified, 128 drop 
  2028.        boxes per Group.
  2029.  
  2030. Examples 
  2031.  
  2032. /* This creates a window called "Drop Me" containing a Group of 1 drop box with 
  2033. a label of "One" and no groupbox.  The drop box's list items are stored in the 
  2034. ONE variable. Those 3 items are "Hello", "Hi", and "Goodbye" */ 
  2035.  
  2036. RXTYPE.1 = 'DROP' 
  2037.  
  2038. /* Default */ 
  2039. RXFLAGS.1 = ' ' 
  2040.  
  2041. /* Labels for each drop box, and Groupbox */ 
  2042. RXLABEL.1 = 'One:' 
  2043.  
  2044. /* Variable names where the items are stored */ 
  2045. RXVAL.1 = 'ONE' 
  2046.  
  2047. /* TotalControls, ControlsPerLine, WidthOfControls */ 
  2048. RXINFO.1 = '1 1 90' 
  2049.  
  2050. /* Position of Group */ 
  2051. RXX.1 = 40 
  2052. RXY.1 = 60 
  2053.  
  2054. /* The items for list 1 */ 
  2055. ONE.1 = 'Hello' 
  2056. ONE.2 = 'Hi' 
  2057. ONE.3 = 'Goodbye' 
  2058. ONE.4 = ' '  /* End of List */ 
  2059.  
  2060. /* Create "Drop Me" window */ 
  2061. RXDIM = '140 104 30 30' 
  2062. RXDLG 1 '"Drop Me"' 'RXDIM' 'RESULT' 
  2063.  
  2064. /* Display the selection */ 
  2065. RXSAY 'Selection is "'ONE.0'"' 
  2066.  
  2067.  
  2068. ΓòÉΓòÉΓòÉ 6.3.3.8. Spin Button ΓòÉΓòÉΓòÉ
  2069.  
  2070. Type           SPIN 
  2071.  
  2072. Description    A spin button is an entry that deals with numeric values.  It 
  2073.                consists of an entry, plus two up and down arrows immediately to 
  2074.                the right of the entry. The up and down arrows will cycle the 
  2075.                spin through its numeric range (and roll over when a lower or 
  2076.                upper numeric limit is surpassed).  Alternately, the user can 
  2077.                click inside of the entry box, and type a number in just as he 
  2078.                would manipulate an entry.  His input is checked against the 
  2079.                spin's upper and lower limit, and forced to fall within that 
  2080.                range.  When the entry is activated, he can also use the up and 
  2081.                down cursor keys to cycle through the range. 
  2082.  
  2083.                If the user changes the numeric value of a spin (either by using 
  2084.                the arrow buttons, or typing a new value, or using the cursor 
  2085.                keys), RXDLG will return if the END Flag is set for this 
  2086.                control's Group. 
  2087.  
  2088.                There is a limit of 256 spin buttons per Group, or if Labels are 
  2089.                specified, 128 spin buttons per Group. 
  2090.  
  2091. Uses           Useful for allowing the user to specify some numeric parameter 
  2092.                such as how many copies of a document he would like printed. 
  2093.                Because the user can type a specific value into the entry, this 
  2094.                offers an easy way to pick out one particular value (ie, it's 
  2095.                easy to make fine adjustments with a spin). 
  2096.  
  2097. REXX Setup 
  2098.  
  2099. RXINFO is a string specifying the TotalControls, ControlsPerLine, and 
  2100. WidthOfControl. 
  2101.  
  2102. The string for RXLABEL has some extra information in addition to the labels for 
  2103. all of the spin buttons in the Group, as well as the Group box label.  Every 
  2104. spin button has a minimum and maximum value that restricts the numeric range of 
  2105. the spin.  For example, you could have a spin that did not allow numbers 
  2106. greater than 100 nor less than 10. The maximum and minimum limits for a 
  2107. particular spin must be specified, in that order, before the spin's label.  One 
  2108. spin's parameters must be separated from the next spin's parameters by a | 
  2109. character.  So, the order of the parameters in the RXLABEL string is: 
  2110.  
  2111. First spin's maximum limit 
  2112. First spin's minimum limit 
  2113. First spin's label 
  2114. Second spin's maximum limit 
  2115. Second spin's minimum limit 
  2116. Second spin's label 
  2117. etc. 
  2118. Group box label 
  2119.  
  2120. If you desire no groupbox label, simply omit it.  If you desire a spin with no 
  2121. label, then omit that spin's label (although you still must specify a maximum 
  2122. and minimum limit). 
  2123.  
  2124. Note:  The maximum limit of a spin is limited to 255 (ie, it can span 256 
  2125.        different values).  The low limit is 0.  The limits are inclusive.  That 
  2126.        is, if you set the low limit to 10 and the high limit to 20, then the 
  2127.        spin can be set to the value 10 or 20, as well as any number inbetween.
  2128.  
  2129. RXVAL is a string containing the initial values of all the spin buttons in the 
  2130. group starting with the first.  You must specify an initial value for each 
  2131. spin.  For example, if you have 3 spin buttons, and you want to set the first 
  2132. spin initially to 30, the second spin to 5, and the third spin to 0, set RXVAL 
  2133. to '30 5 0'. 
  2134.  
  2135. Note:  Don't forget to put quotes around the numeric values in the RXVAL 
  2136.        string.  You need to specify all of numbers as one string.
  2137.  
  2138. RXFLAGS can be any, all, or none of the following: 
  2139.  
  2140. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  2141.                the active dialog window, including this drop box group) when an 
  2142.                item from a list is selected or user types into the entry and 
  2143.                presses ENTER. 
  2144.  
  2145. RXX reflects the position of the entry box of the first spin, not its label 
  2146. (which needs room to the left of the entry in order to be displayed). 
  2147. Therefore, set RXX far enough to the left to leave room for the label. 
  2148.  
  2149. REXX Return 
  2150.  
  2151. Rexx Dialog sets the Group's RXVAL string to contain the current values of all 
  2152. the spin buttons in the group, starting with the first. 
  2153.  
  2154. Examples 
  2155.  
  2156. /* This creates a window called "Spin Me" containing a Group of 1 spin button, 
  2157. labeled "Range:"  with a group box labeled "Value".  The spin has a max limit 
  2158. of 20 and a min limit of 10, and is initially set to 19.  */ 
  2159.  
  2160. RXTYPE.1 = 'SPIN' 
  2161.  
  2162. /* Default */ 
  2163. RXFLAGS.1 = ' ' 
  2164.  
  2165. /* Max, Min, Label for each slider, and groupbox */ 
  2166. RXLABEL.1 = '20 10 Range:|Value' 
  2167.  
  2168. /* Values for each spin */ 
  2169. RXVAL.1 = '19' 
  2170.  
  2171. /* TotalControls, ControlsPerLine, WidthOfControls */ 
  2172. RXINFO.1 = '1 1 70' 
  2173.  
  2174. /* Position */ 
  2175. RXX.1 = 80 
  2176. RXY.1 = 18 
  2177.  
  2178. /* Create "Spin Me" window */ 
  2179. RXDIM = '190 86 30 30' 
  2180. RXDLG 1 '"Spin Me"' 'RXDIM' 'RESULT' 
  2181.  
  2182. /* Now display the value the spin.  Since there's only 1 in this Group, we 
  2183. don't need to parse the RXVAL string for the Group to extract the spin's value 
  2184. */ 
  2185. RXSAY 'value =' RXVAL.1 
  2186.  
  2187.  
  2188. ΓòÉΓòÉΓòÉ 6.3.3.9. Slider ΓòÉΓòÉΓòÉ
  2189.  
  2190. Type           SLIDER 
  2191.  
  2192. Description    Like a spin, the slider also deals with numeric values.  A 
  2193.                slider has a shaft, and a knob that can be "grabbed" with the 
  2194.                mouse (ie, place the mouse pointer over the knob, and press and 
  2195.                hold down the mouse button) and moved along the shaft.  The 
  2196.                numeric value of the slider will change as the knob moves, with 
  2197.                the far left position being 0 and the far right position being 
  2198.                the maximum range of the slider.  Alternately, when a slider has 
  2199.                the focus (ie, its knob has a black dot on it), the knob can be 
  2200.                moved with the left and right cursor keys.  There are also two 
  2201.                arrows immediately to the right of the shaft, which can be used 
  2202.                to adjust the value in fine amounts (ie, single steps). 
  2203.                Alternately, if the mouse is clicked to either side of the knob 
  2204.                (but not on the knob itself), the value will increment or 
  2205.                decrement (depending upon which side of the knob the mouse was 
  2206.                clicked).  The slider may also have a "detent", which is a small 
  2207.                black marker above the shaft, which if the user clicks upon, 
  2208.                forces the knob to jump to that position. 
  2209.  
  2210.                If the user changes the value of a slider (either by moving and 
  2211.                releasing the knob, pressing the ENTER key when the knob is 
  2212.                highlighted, clicking upon the arrows, clicking to either side 
  2213.                of the knob, or clicking upon a detent), RXDLG will return if 
  2214.                the END Flag is set for this control's group. 
  2215.  
  2216.                There is a limit of 256 sliders per Group.  If Labels are 
  2217.                specified, there is a limit of 128 sliders per Group.  If values 
  2218.                are printed out, then there is a limit of 64 sliders per Group. 
  2219.  
  2220. Uses           Allows the user to cycle through a wide range of numeric values 
  2221.                very quickly, albeit hard to pinpoint specific settings, and 
  2222.                therefore is more appropriate to use for setting parameters 
  2223.                where very fine adjustments aren't as important as being able to 
  2224.                quickly cycle through a large range. 
  2225.  
  2226. REXX Setup 
  2227.  
  2228. RXINFO is a string specifying the TotalControls, ControlsPerLine, and 
  2229. WidthOfControl.  The WidthOfControl must be wide enough for OS/2 to have enough 
  2230. pixel resolution to display the range of values (ie, steps) that you want the 
  2231. slider to encompass.  If the width is not wide enough to accomodate the range 
  2232. of values, then OS/2 will not display the slider shaft.  Only the knob may be 
  2233. visible, and subsequent updating of the slider display will be bizarre to say 
  2234. the least.  PM's slider needs fixing. 
  2235.  
  2236. The string for RXLABEL has some extra information in addition to the labels for 
  2237. all of the sliders in the Group, as well as the Group box label.  Every slider 
  2238. button has a value that determines how many steps the slider can move (ie, its 
  2239. range of values).  For example, you could have a slider that could be set to 
  2240. one of 20 different steps.  Also, a slider may have a detent.  The NumOfSteps 
  2241. and Detent for a particular slider must be specified, in that order, before the 
  2242. slider's label.  One slider's parameters must be separated from the next 
  2243. slider's parameters by a | character.  So, the order of the parameters in the 
  2244. RXLABEL string is: 
  2245.  
  2246. First slider's NumOfSteps 
  2247. First slider's Detent 
  2248. First slider's label 
  2249. Second slider's NumOfSteps 
  2250. Second slider's Detent 
  2251. Second slider's label 
  2252. etc. 
  2253. Group box label 
  2254.  
  2255. If you desire no groupbox label, simply omit it.  If you desire a slider with 
  2256. no label, then omit that slider's label (although you still must specify 
  2257. NumOfSteps and Detent).  If you desire no Detent, then set Detent to 255. 
  2258.  
  2259. The Detent value is not in terms of steps, but rather pixels from the left of 
  2260. the slider shaft.  Therefore, if the slider WidthOfControl is 128, and you wish 
  2261. to place a Detent halfway across the slider, then set Detent to 64. 
  2262.  
  2263. Note:  The maximum range of a slider is 0 to 254 (ie, 255 steps).  The 
  2264.        NumOfSteps setting is exclusive.  That is, if you set NumOfSteps to 20, 
  2265.        then the slider can be set to a value from 0 to 19 (ie, a total of 20 steps).
  2266.  
  2267. RXVAL is a string containing the initial values of all the sliders in the group 
  2268. starting with the first.  You must specify an initial value for each slider. 
  2269. For example, if you have 3 sliders, and you want to set the first slider 
  2270. initially to 30, the second slider to 5, and the third slider to 0, set RXVAL 
  2271. to '30 5 0'. 
  2272.  
  2273. Note:  Don't forget to put quotes around the numeric values in the RXVAL 
  2274.        string.  You need to specify all of numbers as one string.
  2275.  
  2276. RXFLAGS can be any, all, or none of the following: 
  2277.  
  2278. 'VALUE'        Automatically prints out the current value of the slider to the 
  2279.                right of the shaft. 
  2280.  
  2281. 'END'          Causes RXDLG to return (with all RXVALs set for all Groups in 
  2282.                the active dialog window, including this drop box group) when an 
  2283.                item from a list is selected or user types into the entry and 
  2284.                presses ENTER. 
  2285.  
  2286. RXX reflects the position of the shaft of the first slider, not its label 
  2287. (which needs room to the left of the shaft in order to be displayed). 
  2288. Therefore, set RXX far enough to the left to leave room for the label. 
  2289.  
  2290. REXX Return 
  2291.  
  2292. Rexx Dialog sets the Group's RXVAL string to contain the current values of all 
  2293. the sliders buttons in the group, starting with the first. 
  2294.  
  2295. Examples 
  2296.  
  2297. /* This creates a window called "Slide Me" containing a Group of 1 slide 
  2298. button, labeled "Range:"  with a group box labeled "Value".  The slider has 20 
  2299. steps, a detect at 45 (ie, in the center), and is initially set to 12 */ 
  2300.  
  2301. RXTYPE.1 = 'SLIDER' 
  2302.  
  2303. /* Print value as slider moves */ 
  2304. RXFLAGS.1 = 'VALUE' 
  2305.  
  2306. /* NumOfSteps, Detent, Label for each slider, and groupbox */ 
  2307. RXLABEL.1 = '20 45 Range:|Value' 
  2308.  
  2309. /* Values for each slider */ 
  2310. RXVAL.1 = '12' 
  2311.  
  2312. /* TotalControls, ControlsPerLine, WidthOfControls */ 
  2313. RXINFO.1 = '1 1 90' 
  2314.  
  2315. /* Position */ 
  2316. RXX.1 = 80 
  2317. RXY.1 = 18 
  2318.  
  2319. /* Create "Slide Me" window */ 
  2320. RXDIM = '230 86 30 30' 
  2321. RXDLG 1 '"Slide Me"' 'RXDIM' 'RESULT' 
  2322.  
  2323. /* Now display the value of the slider.  Since there's only 1 in this Group, we 
  2324. don't need to parse the RXVAL string for the Group to extract the slider's 
  2325. value */ 
  2326. RXSAY 'value =' RXVAL.1 
  2327.  
  2328.  
  2329. ΓòÉΓòÉΓòÉ 6.3.3.10. Text ΓòÉΓòÉΓòÉ
  2330.  
  2331. Type           TEXT 
  2332.  
  2333. Description    This merely displays phrases of text.  A phrase is any number of 
  2334.                words and punctuation that is not broken by a line feed.  The 
  2335.                user can't edit nor select the text in any way.  It's simply for 
  2336.                the purpose of displaying text in a window. 
  2337.  
  2338.                There is a limit of 256 phrases per Group. 
  2339.  
  2340.                A TEXT Group can't cause RXDLG to return. 
  2341.  
  2342. Uses           Can be used to display instructions, or label things in a 
  2343.                window, or display some message to the user. 
  2344.  
  2345. REXX Setup 
  2346.  
  2347. RXINFO is a string specifying the TotalPhrases, PhrasesPerLine, and 
  2348. WidthOfPhrase, and SpaceBetweenPhrases.  SpaceBetweenPhrases is only effective 
  2349. if PhrasesPerLine is greater than 1 (ie, you're putting more than one phrase on 
  2350. a line).  In this case, SpaceBetweenPhrases allows you to evenly space out the 
  2351. phrases, which is handy if you need to make columns of data (where 
  2352. SpaceBetweenPhrases would be the space between columns).  If you're going to 
  2353. place more than one phrase upon a line, then SpaceBetweenPhrases should be 8 or 
  2354. more.  If WidthOfPhrase is 0, then Rexx Dialog automatically sets up all of the 
  2355. phrases to be as wide as the longest phrase, which ensures that no phrase will 
  2356. be visually clipped.  Otherwise, if you specify a WidthOfPhrase, make sure that 
  2357. is wide enough to accomodate the widest phrase.  WidthOfPhrase is limited to 
  2358. 255 pels maximum.  (If you need to set a wider default, use RXSET's SIZE 
  2359. command after creating the Group).  If you're going to be changing a phrase 
  2360. later with the RXSET command, then either make sure that you aren't going to 
  2361. change it to some phrase that is wider than the widest original phrase in the 
  2362. group, or specify a WidthOfPhrase to accomodate any changes that will be made 
  2363. to the phrase, or use RXSET's SIZE command to size a particular phrase as 
  2364. desired (the 255 pel limit does not apply to RXSET's SIZE command). 
  2365.  
  2366. The string for RXLABEL contains all of the phrases in the Group, as well as the 
  2367. Group box label.  Each phrase is separated from the next by a | character.  The 
  2368. group box label is last (or omitted if no group box is desired).  If you want a 
  2369. blank area where a phrase would go (this would be a blank line if 
  2370. PhrasesPerLine=0), then simply put a space where that phrase would be 
  2371. specified. 
  2372.  
  2373. RXVAL is not used, and need not be initialized. 
  2374.  
  2375. RXFLAGS can be any, all, or none of the following: 
  2376.  
  2377. 'CENTER'       Each phrase is centered relative to the other phrases on lines 
  2378.                above or below. 
  2379.  
  2380. 'RIGHT'        All phrases are aligned along the right margin. 
  2381.  
  2382.                Note:  If neither RIGHT nor CENTER flags are specified, then all 
  2383.                       phrases are aligned along the left margin.
  2384.  
  2385. REXX Return 
  2386.  
  2387. None.  A TEXT Group doesn't interact with the user in any way, nor does it 
  2388. cause RXDLG to return. 
  2389.  
  2390. Examples 
  2391.  
  2392. /* This creates a window called "Text" containing 1 TEXT Group with 3 lines of 
  2393. centered text with a groupbox */ 
  2394.  
  2395. RXTYPE.1 = 'TEXT' 
  2396.  
  2397. /* Center the text */ 
  2398. RXFLAGS.1 = 'CENTER' 
  2399.  
  2400. /* Text lines */ 
  2401. RXLABEL.1 = 'PLEASE READ!|This is a REXX example of|centered text.|Text Stuff' 
  2402.  
  2403. /* TotalPhrases, PhrasesPerLine, WidthOfPhrase, BetweenPhrases. Note: because 
  2404. we want WidthOfPhrase and BetweenPhrases to be 0, then we can omit both args. 
  2405. Rexx Dialog sets omitted args to 0 */ 
  2406. RXINFO.1 = '3 1' 
  2407.  
  2408. /* Position */ 
  2409. RXX.1 = 10 
  2410. RXY.1 = 10 
  2411.  
  2412. RXDIM = ' ' 
  2413. RXDLG 1 '"Text"' 'RXDIM' 'SIZE|RESULT' 
  2414.  
  2415.  
  2416. ΓòÉΓòÉΓòÉ 6.3.3.11. Group Box ΓòÉΓòÉΓòÉ
  2417.  
  2418. Type           GROUP 
  2419.  
  2420. Description    This is a rectangular box, within which other controls can be 
  2421.                placed.  The box can have its own label, which usually pertains 
  2422.                to whatever is the purpose of the controls within the box. 
  2423.  
  2424.                A group box can't cause RXDLG to return. 
  2425.  
  2426. Uses           Identifies controls that "belong together" usually because they 
  2427.                are all related to one operation. 
  2428.  
  2429. REXX Setup 
  2430.  
  2431. A GROUP Type only describes one group box.  In other words, it isn't a group of 
  2432. group boxes.  You can have more than 1 GROUP in a window, but of course, you'll 
  2433. have to specify each separately. 
  2434.  
  2435. RXINFO is a string specifying the Width and Height of the group box (in 
  2436. pixels). 
  2437.  
  2438. RXLABEL is the label for the group box (or a null string if no label desired, 
  2439. ie, the group box is simply a rectangular box). 
  2440.  
  2441. RXVAL is not used, and need not be initialized. 
  2442.  
  2443. RXFLAGS is not used, and should be set to a null string. 
  2444.  
  2445. Note:  A GROUP must be specified before any of the controls that will be 
  2446.        displayed inside of it, otherwise the group box will draw over those 
  2447.        controls and visually wipe them from the display.
  2448.  
  2449. REXX Return 
  2450.  
  2451. None.  A GROUP doesn't interact with the user in any way, nor does it cause 
  2452. RXDLG to return. 
  2453.  
  2454. Examples 
  2455.  
  2456. /* This creates a window called "Group" that contains a GROUP box */ 
  2457.  
  2458. RXTYPE.1 = 'GROUP' 
  2459.  
  2460. /* Default */ 
  2461. RXFLAGS.1 = ' ' 
  2462.  
  2463. /* Label */ 
  2464. RXLABEL.1 = 'Everything' 
  2465.  
  2466. /* Width, Height */ 
  2467. RXINFO.1 = '240 220' 
  2468.  
  2469. /* Position */ 
  2470. RXX.1 = 6 
  2471. RXY.1 = 6 
  2472.  
  2473. RXDIM = ' ' 
  2474. RXDLG 1 '"Group"' 'RXDIM' 'SIZE|RESULT' 
  2475.  
  2476.  
  2477. ΓòÉΓòÉΓòÉ 6.3.3.12. Menu ΓòÉΓòÉΓòÉ
  2478.  
  2479. Type           MENU 
  2480.  
  2481. Description    A menu attaches to the titlebar of the window, and will drop 
  2482.                down when the user clicks the mouse on a Menu Heading in the 
  2483.                titlebar (ie, the menu attached to that Menu Heading drops 
  2484.                down).  The user can then make selections with the mouse. 
  2485.                Alternately, if the menus have "mnemonic keys", those keys can 
  2486.                be used to open and select menu items. 
  2487.  
  2488.                Note:  There must only be 1 MENU Group per window, and there is 
  2489.                       a limit of 256 Labels in a menu.
  2490.  
  2491. Uses           Operations that can be arranged into groups lend themselves well 
  2492.                to being put into a menu.  For example, all file load and save 
  2493.                operations may be placed into a menu with a heading of "File". 
  2494.  
  2495. REXX Setup 
  2496.  
  2497. RXINFO is a string specifying the TotalMenus (ie, total Menu Headings), and 
  2498. then the REXX stem variable names (where the menu labels are fetched) for all 
  2499. of the menus (headings).  Each variable name is separated from the next by a | 
  2500. character.  If TotalMenus is 0, then an "empty" menu is created, and the 
  2501. variable names do not need to be supplied.  This is more memory efficient if 
  2502. you plan upon using the RXSET ADD Operation to later create a new menu bar. 
  2503.  
  2504. Note:  Placing a ~ character before some letter in a Label, means that, when 
  2505.        the menu is displayed, pressing that letter on the keyboard activates 
  2506.        the menu item\subitem associated with that label.  This is a mnemonic.
  2507.  
  2508. RXLABEL need not be initialized. 
  2509.  
  2510. RXVAL need not be initialized. 
  2511.  
  2512. RXFLAGS can be any, all, or none of the following: 
  2513.  
  2514. 'HELP'         A "Help" menu is automatically added to the end of the menu bar, 
  2515.                containing 4 Help Items labeled "Help index", "General Help", 
  2516.                "Using Help", and "Keys Help".  Whenever the user selects one of 
  2517.                these Items, Rexx Dialog automatically handles this (ie, and 
  2518.                RXDLG doesn't return) by displaying an appropriate panel in any 
  2519.                help file attached to the window.  See RXHELP.  The Help File 
  2520.                that you write should have a panel with the name KEYS that lists 
  2521.                any keyboard commands for the program.  If there are no such 
  2522.                keyboard commands, then do not name any panel KEYS. 
  2523.  
  2524. REXX Return 
  2525.  
  2526. RXID is the Group number for this MENU Group (ie, if the MENU Group is the 
  2527. First Group in the window, then RXID is 1).  RXSUBID is the menu label number. 
  2528. This will depend upon which item or subitem was chosen.  The menu labels are 
  2529. numbered from top to bottom, and left to right.  For example, assume that you 
  2530. have w Menu Headings labeled "File" and "Edit".  "File" has 2 items labeled 
  2531. "Open" and "Save".  The first item ("Open") has 2 subitems labeled "All" and 
  2532. "Excerpt".  Here's how the menu would look displayed: 
  2533.  
  2534. ΓòÆΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòò  ΓòÆΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòò
  2535. Γöé  File  Γöé  Γöé  Edit  Γöé
  2536. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓòÆΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòò
  2537. Γöé  Open->ΓöéΓöéAll    Γöé
  2538. Γöé  Save  ΓöéΓöéExcerptΓöé
  2539. ΓòÿΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¢ΓòÿΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¢
  2540.  
  2541. "File" is label 1.  "Open" is label 2.  But, since "Open" has two subitems, we 
  2542. count those before moving on to "Save".  So, "All" is label 3, and "Excerpt" is 
  2543. label 4.  "Save" is label 5.  That's all of the items\subitems in the first 
  2544. menu, so moving on to the next menu, "Edit" is label 6.  The first item in the 
  2545. "Edit" menu would be label 7.  Etc. 
  2546.  
  2547. If you specify the HELP Flag, then the first 5 label numbers correspond to the 
  2548. Help Heading, and the 4 Help Items, "Help index", "General Help", "Using Help", 
  2549. and "Keys Help", even though the Help menu appears last on the menu bar. 
  2550. Therefore, the menu label that actually appears on the left side of the menu 
  2551. bar is label number 6.  So, if we had a HELP menu in the above example, then 
  2552. the label numbering would be changed to be "File" = 6, "Open" = 7, "All" = 8, 
  2553. "Excerpt" = 9, "Save" = 10, and "Edit" = 11. 
  2554.  
  2555. Examples 
  2556.  
  2557. The REXX stem variable for a particular menu is setup such that a stem of 0 is 
  2558. assigned the heading of the menu.  Subsequent stems starting at 1 are the item 
  2559. labels.  A null string must mark the end of the items.  For example, if you 
  2560. have a menu with a heading of "File" and 2 items labeled "Item 1" and "Item 2", 
  2561. and the REXX variable name you supplied in the RXINFO string is 'MENU', then 
  2562. here is the setup: 
  2563.  
  2564. /* Menu Structure */ 
  2565. MENU.0 = 'File'      /* Heading */ 
  2566. MENU.1 = 'Item 1'  /* First Item */ 
  2567. MENU.2 = 'Item 2'    /* Second Item */ 
  2568. MENU.3 = ' '         /* End of Items */ 
  2569.  
  2570. If an item has any subitems, the number of subitems should be placed after that 
  2571. item's label, separated by a | character.  The labels for those subitems are 
  2572. assigned to compound variables where an extra stem is added to the item's 
  2573. variable name.  The extra stem is the subitem number, starting with 1. 
  2574.  
  2575. For example, if "Item 1" had 2 subitems labeled "Sub 1" and "Sub 2": 
  2576.  
  2577. /* Menu Structure */ 
  2578. MENU.0 = 'File'   /* Heading */ 
  2579. MENU.1 = 'Item 1|2' /* First Item, # of subitems */ 
  2580. MENU.2 = 'Item 2'  /* Second Item */ 
  2581. MENU.3 = ' '     /* End of Items */ 
  2582.  
  2583. MENU.1.1 = 'Sub 1' /* First SubItem for Item 1 */ 
  2584. MENU.1.2 = 'Sub 2' /* Second SubItem for Item 1 */ 
  2585.  
  2586. As a further example, assume "Item 2" had 1 subitem labeled "hello": 
  2587.  
  2588. /* Menu Structure */ 
  2589. MENU.0 = 'File'   /* Heading */ 
  2590. MENU.1 = 'Item 1|2'  /* First Item, # of subitems */ 
  2591. MENU.2 = 'Item 2|1' /* Second Item, # of subitems */ 
  2592. MENU.3 = ' '     /* End of Items */ 
  2593.  
  2594. MENU.1.1 = 'Sub 1' /* First SubItem for Item 1 */ 
  2595. MENU.1.2 = 'Sub 2' /* Second SubItem for Item 1 */ 
  2596.  
  2597. MENU.2.1 = 'hello' /* First SubItem for Item 2 */ 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ 6.3.4. The TAB key ΓòÉΓòÉΓòÉ
  2601.  
  2602. Pressing the TAB key causes the focus (ie, which control is active) to switch 
  2603. to the next control in the window (regardless of whether the next control is 
  2604. within the same Group as the control that currently has the focus).  This 
  2605. allows using the computer keyboard to select which control is active.  In 
  2606. conjunction with the ENTER and SPACE BAR (for buttons and multiple select 
  2607. lists), any control can be activated, manipulated, and then selected without 
  2608. requiring a mouse. 
  2609.  
  2610. Holding down the CTRL key while pressing TAB causes the focus to jump to the 
  2611. first control of the next Group within a window.  This allows quickly jumping 
  2612. from Group to Group. 
  2613.  
  2614. If no control has the focus (ie, the window itself has the focus), then 
  2615. pressing the TAB key causes the focus to jump to the first control of the first 
  2616. Group. 
  2617.  
  2618. Even if the END flag is set for a Group, when the user switches the focus from 
  2619. a control in that Group, RXDLG does not return.  Therefore, it's possible for 
  2620. the user to select various controls via the TAB key, changing their values, and 
  2621. never having to cause RXDLG to return.  In order to have a control (in a Group 
  2622. with its END Flag set) cause RXDLG to return, the user must explicitly indicate 
  2623. that he is done manipulating the control (for example, he has to press the 
  2624. ENTER key when he's done entering text into an ENTRY.  If he instead presses 
  2625. TAB to switch to another control, RXDLG doesn't return for that ENTRY). 
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 6.3.5. NOCLOSE Flag ΓòÉΓòÉΓòÉ
  2629.  
  2630. There are a few reasons why you may want to specify NOCLOSE when creating a 
  2631. window. 
  2632.  
  2633. Let's assume that you want to get input from the user, perform some operation 
  2634. using that input, and then get some more of the same type of input from the 
  2635. user.  You could open a window without NOCLOSE, and when RXDLG returns, it will 
  2636. have returned the user input and closed the window.  You could then perform the 
  2637. operation, and subsequently call RXDLG to reopen the same window.  Here's an 
  2638. example of that approach: 
  2639.  
  2640. /* =============== Create "Main Window" ================= */ 
  2641. /* Just put 1 Group of checkmark buttons in it */ 
  2642. RXTYPE.1 = 'CHECK' 
  2643. RXFLAGS.1 = 'NUMBERED' 
  2644. RXLABEL.1 = 'Pick one' 
  2645. RXINFO.1 = '16 4 0' 
  2646. RXVAL.1 = '1' 
  2647. RXX.1 = 10 
  2648. RXY.1 = 10 
  2649. RXWIN1 = ' ' 
  2650.  
  2651. here: 
  2652.  
  2653. /* Don't specify NOCLOSE */ 
  2654. RXDLG 1 '"Main Window"' 'RXWIN1'  /* No Flags arg needed, as there's nothing to 
  2655. specify */ 
  2656.  
  2657. /* Now we use RXDLG's second template to perform user interaction. No window or 
  2658. operation arg means "Use Main Window" and "Operation 0" (ie, perform user 
  2659. interaction, but don't clear any NOCLOSE Flag -- not applicable here since we 
  2660. never set that flag anyway) */ 
  2661. RXDLG 
  2662.  
  2663. /* The window is now closed */ 
  2664.  
  2665. /* At this point, we examine the REXX return values, and perform some 
  2666. operation. Then we jump back to "here" */ 
  2667. SIGNAL here 
  2668.  
  2669. In the above example, the window would be opening and closing for each 
  2670. iteration.  What if you wanted the window to stay open until you had completed 
  2671. as many iterations as desired?  Well, that's where NOCLOSE comes in.  Here's 
  2672. the revamped version (from the label "here" -- everything up to that point 
  2673. remains the same): 
  2674.  
  2675. here: 
  2676.  
  2677. /* Specify NOCLOSE, so RXDLG doesn't close the window when it returns */ 
  2678. RXDLG 1 '"Main Window"' 'RXWIN1'  'NOCLOSE' 
  2679.  
  2680. more: 
  2681.  
  2682. /* Now we need to use RXDLG's second template to perform user interaction. No 
  2683. window or operation arg means "Use Main Window" and "Operation 0" (ie, perform 
  2684. user interaction, but don't tell Rexx Dialog that it's OK to close the window) 
  2685. */ 
  2686. RXDLG 
  2687.  
  2688. /* The window is still open */ 
  2689.  
  2690. /* At this point, we examine the REXX return values, and perform some 
  2691. operation.  Then, we can jump back to the label "more" to do more user 
  2692. interaction.  We don't jump back to "here" because we don't need to open the 
  2693. window again */ 
  2694. SIGNAL more 
  2695.  
  2696. Another reason to use NOCLOSE is if you have a Group which you want to cause 
  2697. RXDLG to return (ie, you specified the 'END' Flag for the Group), but you don't 
  2698. want that to cause the window to be closed.  For example, maybe each checkmark 
  2699. button in the above group causes the REXX script to turn on/off something, and 
  2700. you want this action to be performed in realtime.  (ie, As soon as the user 
  2701. selects a checkmark, turning it on or off, you want control to return to the 
  2702. REXX script so that you can carry out that operation immediately.  Therefore, 
  2703. you have to specify the END Flag for the Group, because otherwise, RXDLG 
  2704. wouldn't return after each click on a checkmark -- it would only return when 
  2705. the user clicked on the CLOSE ICON for the window).  But, you don't want the 
  2706. window to close down everytime that he clicks on a checkmark in that Group 
  2707. either.  So, you need to specify NOCLOSE too. 
  2708.  
  2709.  
  2710. ΓòÉΓòÉΓòÉ 6.3.6. MODAL Flag ΓòÉΓòÉΓòÉ
  2711.  
  2712. Normally, the WindowTitle arg for the second template of RXDLG will either be 
  2713. omitted (if also doing an Operation of 0), or specified as a pair of double 
  2714. quotes inside of single quotes (ie, '""') meaning that you wish Rexx Dialog to 
  2715. initiate user interaction upon the window that was active during the previous 
  2716. call to RXDLG. 
  2717.  
  2718. There may be times when you have multiple windows open, but you want to force 
  2719. the user to interact with only one of the windows (ie, disable interaction with 
  2720. the other windows).  You do this by specifying the MODAL Flag when you create 
  2721. the window, and then passing that window's title to RXDLG when doing an 
  2722. Operation that performs user interaction (ie, 0 or 1).  Rexx Dialog will 
  2723. disable all other windows (and any controls in the Main Window).  The user must 
  2724. interact with only that window (although he is allowed to minimize or resize 
  2725. the Main Window, and perhaps switch to another app).  Only when that window is 
  2726. destroyed will this "Modal State" also be ended. 
  2727.  
  2728. Note:  The Main Window can't be made MODAL.
  2729.  
  2730. By making Child Dialogs modal, and then passing the title of the specific 
  2731. window that you wish to be the "active" window to RXDLG, you can control the 
  2732. user's interaction with multiple open windows. 
  2733.  
  2734.  
  2735. ΓòÉΓòÉΓòÉ 6.3.7. Opening windows within a message loop ΓòÉΓòÉΓòÉ
  2736.  
  2737. For windows that are going to be open during the life of your script, you 
  2738. normally will make a series of calls to RXDLG, using the first template, to 
  2739. create all of those windows.  Then, after all windows are open, you'll drop 
  2740. into a "message loop" around a call to RXDLG using its second template to do 
  2741. user interaction upon the windows. 
  2742.  
  2743. But, you can call RXDLG, using the first template, to create new windows at any 
  2744. time, including within that message loop.  For example, you could have a button 
  2745. in the Main Window which causes RXDLG to return.  When your message loop 
  2746. detects that this button in Main Window has been pressed, you could call RXDLG 
  2747. to create a new window.  But, your message loop should also contain 
  2748. instructions to specifically handle any situation where RXWIND is returned as 
  2749. the name of that new window.  After all, that will be one more open window that 
  2750. the user can choose to interact with. 
  2751.  
  2752.  
  2753. ΓòÉΓòÉΓòÉ 6.3.8. A message loop within a message loop ΓòÉΓòÉΓòÉ
  2754.  
  2755. Let's assume that you have a button in the Main Window labeled "Players names" 
  2756. which causes RXDLG to return.  When your message loop detects that this button 
  2757. in Main Window has been pressed, you want to call RXDLG to create a new window 
  2758. with an ENTRY for the user to type in some person's name.  Each time that the 
  2759. person types in a name, you want to add this to a stem variable, clear the 
  2760. ENTRY, and let him type in another player's name.  During this entire process, 
  2761. you want to prevent him from interacting with other windows.  When he finally 
  2762. enters a blank name, or clicks upon the window's CLOSE ICON, then you'll close 
  2763. the window, and return to allowing the user to interact with whatever other 
  2764. windows are open at his discretion.  For that ENTRY window, you'll make it 
  2765. MODAL, and then do what appears to be a message loop (on that MODAL window) 
  2766. inside of the larger message loop. 
  2767.  
  2768. /* =============== Create "Main Window" ================= */ 
  2769. /* Just put 1 Push button in it */ 
  2770. RXTYPE.1 = 'PUSH' 
  2771. RXFLAGS.1 = 'END' 
  2772. RXLABEL.1 = 'Players names' 
  2773. RXINFO.1 = '1 1 0' 
  2774. RXVAL.1 = '1' 
  2775. RXX.1 = 10 
  2776. RXY.1 = 10 
  2777. RXWIN1 = ' ' 
  2778. RXDLG 1 '"Main Window"' 'RXWIN1' 'NOCLOSE' 
  2779.  
  2780. /* Perhaps open more windows now... */ 
  2781.  
  2782. /* Put any window's Dimensions strings outside of the message loop so it only 
  2783. gets initialized once */ 
  2784. RXWIN2 = '150 70 50 50' 
  2785.  
  2786. more: 
  2787.  
  2788. /* Do user interaction upon main (and any other open) windows */ 
  2789. RXDLG 
  2790.  
  2791. /* Did the user click on the Main Window's CLOSE ICON? If so, end the program 
  2792. */ 
  2793. IF RXID < 0 THEN DO 
  2794.   IF RXWIND = 'Main Window' THEN EXIT 
  2795. END 
  2796.  
  2797. ELSE SELECT 
  2798.   WHEN RXWIND = 'Main Window' THEN DO 
  2799.   /* There's only 1 button in Main, so don't bother checking RXID and RXSUBID 
  2800. */ 
  2801.  
  2802.     /* Open that Child Dialog with the ENTRY. NOCLOSE and MODAL */ 
  2803.     RXTYPE.1 = 'ENTRY' 
  2804.     RXFLAGS.1 = 'END' 
  2805.     RXLABEL.1 = 'Name:' 
  2806.     RXINFO.1 = '1 1 60' 
  2807.     RXVAL.1 = 'TEXT' 
  2808.     RXX.1 = 50 
  2809.     RXY.1 = 10 
  2810.     TEXT.1 = ' ' 
  2811.     RXDLG 1 '"Player Name"' 'RXWIN2' 'NOCLOSE|MODAL' 
  2812.  
  2813.     /* Get the next name */ 
  2814.     name = 1 
  2815.     DO WHILE name > 0 
  2816.       RXDLG '"Player Name"' 
  2817.  
  2818.       /* Did the user click on window's CLOSE ICON? If so, return to main loop 
  2819. */ 
  2820.       IF RXID < 0 | TEXT.1 = 0 THEN DO 
  2821.         RXDLG '"Player Name"' 4 
  2822.         name = 0 
  2823.       END 
  2824.  
  2825.       ELSE DO 
  2826.         NAMES.name = TEXT.1 
  2827.         name = name + 1 
  2828.          RXSET '"Player Name"' 1 1 'VAL' 
  2829.       END 
  2830.     END 
  2831.   END 
  2832. END 
  2833.  
  2834. /* Go back to the "main" message loop */ 
  2835. SIGNAL more 
  2836.  
  2837.  
  2838. ΓòÉΓòÉΓòÉ 6.4. RXERR ΓòÉΓòÉΓòÉ
  2839.  
  2840. Template       RXERR Flags 
  2841.  
  2842. Description    This command controls whether Rexx Dialog automatically displays 
  2843.                error message boxes when an error occurs (as a result of calling 
  2844.                some Rexx Dialog command).  It also controls whether error 
  2845.                messages or error numbers are returned to a script.  Sometimes, 
  2846.                it's easier for a script to deal with error numbers rather than 
  2847.                messages when trying to recover from some error situation.  If 
  2848.                Rexx Dialog is allowed to automatically display, this also 
  2849.                controls whether just the error message is displayed, or whether 
  2850.                the line number and REXX source where the error occurred is also 
  2851.                displayed in a message box. 
  2852.  
  2853.                RXERR can be called at any time.  (ie, You can change the error 
  2854.                behavior at any time via a call to RXERR). 
  2855.  
  2856. Args 
  2857.  
  2858. Flags          A string that describes the various display and control options 
  2859.                for error returns.  You can specify any or all of these Flags, 
  2860.                and each one must be separated by a | character, enclosed in 
  2861.                quotes. The various Flags are: 
  2862.  
  2863. NUM            Return error numbers instead of error messages.  For example, if 
  2864.                you pass the title of a window that isn't open to RXDLG (ie, 
  2865.                using its second template), then RXDLG will return, setting the 
  2866.                special variable RC to error number 10011 rather than the 
  2867.                message "Can't find Rexx Dialog.". 
  2868.  
  2869. FULL           If Rexx Dialog is automatically displaying error messages for a 
  2870.                particular error number, then you want the line number and REXX 
  2871.                source where the error occurred to also be displayed.  (Without 
  2872.                this flag, Rexx Dialog displays only the error message). 
  2873.  
  2874. A display level (ie, numeric arg) can also be specified.  Rexx Dialog displays 
  2875. error messages for all errors that have a display level less than or equal the 
  2876. specified level.  If display level is 0, then Rexx Dialog never displays error 
  2877. messages (having to do with calls to Rexx Dialog functions -- the REXX 
  2878. Interpreter may still present message boxes for such things as syntax errors, 
  2879. etc).  If display level is not specified, then Rexx Dialog will display any 
  2880. error message having to do with a Rexx Dialog function. 
  2881.  
  2882. Note:  A particular error's display level is simply the rightmost two digits of 
  2883.        the error number.  For example, the "Can't find Rexx Dialog" error has 
  2884.        an error number of 10011.  It's display level is therefore 11.  If you 
  2885.        specify a display level of 10 to RXERR, then Rexx Dialog will not 
  2886.        automatically display the "Can't find Rexx Dialog" error message (nor 
  2887.        any error messages with higher display levels).  See Errors for details 
  2888.        on the error number for all Rexx Dialog error messages.
  2889.  
  2890. It doesn't matter in which order flags are specified. 
  2891.  
  2892. When you specify FULL, any Rexx Dialog errors that are to be automatically 
  2893. displayed generate a REXX FAILURE condition.  Otherwise, Rexx Dialog errors 
  2894. generate a REXX ERROR condition. 
  2895.  
  2896. Returns 
  2897.  
  2898. None 
  2899.  
  2900. Examples 
  2901.  
  2902. /* This specifies that Rexx Dialog is not to display any error messages (ie, 
  2903. display level is 0), and is to return error numbers for RC */ 
  2904.  
  2905. RXERR 'NUM|0' 
  2906.  
  2907.  
  2908. ΓòÉΓòÉΓòÉ 6.5. RXFILE ΓòÉΓòÉΓòÉ
  2909.  
  2910. Template       RXFILE Type FilenameVar ButtonLabel '|' Title 
  2911.  
  2912. Description    This command presents the OS/2 File Dialog, whereby the user can 
  2913.                pick out a filename (complete with path), which is returned to 
  2914.                the script. 
  2915.  
  2916.                The File Dialog will open on the Desktop if there are no windows 
  2917.                open.  Otherwise, it will open in the Main Window, and will be a 
  2918.                modal dialog (ie, user can't interact with any windows until the 
  2919.                File Dialog is dismissed). 
  2920.  
  2921. Args 
  2922.  
  2923. Type is either 'LOAD' or 'SAVE'.  If 'LOAD', then the user is allowed to click 
  2924. upon a filename in the list of files in the displayed directory, and that 
  2925. selection is copied to the filename entry.  If 'SAVE', the user can't click 
  2926. upon a filename in the list.  The list is just for reference, and the user must 
  2927. manually type in the desired name.  The latter scheme makes it more difficult 
  2928. to accidentally click on an existing file, which would be dangerous for a save 
  2929. operation. 
  2930.  
  2931. FilenameVar is the name of the REXX variable where the filename will be 
  2932. returned.  Before the call to RXFILE, this must be initialized with a file or 
  2933. path name in order to bring up the File Dialog displaying the contents of that 
  2934. directory.  For example, assume that FilenameVar will be RXNAME.  Setting 
  2935. RXNAME to 'C:\OS2\*.exe' will display all of the files in the 'C:\OS2' 
  2936. directory that end in an '.exe' extension.  If you want to display all files in 
  2937. a directory then use '*.*', for example 'C:\OS2\*.*'.  If you want to display 
  2938. the current directory, with no filtering, then set the variable to a null 
  2939. string (ie, ' '). 
  2940.  
  2941. ButtonLabel is a string that you want displayed in the "OK" button of the File 
  2942. Dialog.  If omitted, the default string is "OK". 
  2943.  
  2944. Title is the string that you want displayed in the titlebar of the File Dialog. 
  2945. If omitted, then the titlebar is blank.  If this is specified, you must place a 
  2946. | character in quotes inbetween the ButtonLabel and Title.  (It's ok to omit 
  2947. any ButtonLabel before the | character, if desired). 
  2948.  
  2949. Returns 
  2950.  
  2951. If Rexx Dialog is returning strings (ie, the NUM flag has not been specified to 
  2952. RXERR), then a null string '' is returned if the user clicked upon the "OK" 
  2953. button to end the dialog.  "Cancel" is returned if the user clicked upon the 
  2954. CANCEL button to end the dialog.  (The CANCEL button does not raise a REXX 
  2955. FAILURE or ERROR, nor does it automatically display an error message, so you 
  2956. must explicitly check the RC return of RXFILE in order to determine if the user 
  2957. cancelled the filename selection.  If Rexx Dialog is returning numbers, then 0 
  2958. is OK, and 350 is CANCEL. 
  2959.  
  2960. This may return other errors as described in Errors, which raise a REXX FAILURE 
  2961. or ERROR. 
  2962.  
  2963. If an OK selection, the filename is returned in the REXX variable specified by 
  2964. the FilenameVar arg.  This will be a fully qualified filename (ie, with the 
  2965. drive and directory too). 
  2966.  
  2967. Examples 
  2968.  
  2969. /* This gets a filename selection and checks for 'OK' selection */ 
  2970.  
  2971. /* Store the filename in the variable FN. Initialize it to '*.cmd' in order to 
  2972. initially display all filenames in the current directory that end in '.cmd' */ 
  2973. FN = '*.cmd' 
  2974. RXFILE 'LOAD' 'FN' 'Load Me|' 'This is the title' 
  2975. IF RC = '' THEN DO  /* check for 0 if Rexx Dialog returning numbers */ 
  2976.   /* Do some operation with the filename in FN */ 
  2977. END 
  2978.  
  2979.  
  2980. ΓòÉΓòÉΓòÉ 6.6. RXHELP ΓòÉΓòÉΓòÉ
  2981.  
  2982. Template       RXHELP 'CREATE' WindowTitle HelpFilename 
  2983.                RXHELP 'FREE' WindowTitle 
  2984.                RXHELP Panel WindowTitle 
  2985.  
  2986. Description    This command attaches or detaches an OS/2 Help file to a window, 
  2987.                and then can to be used to display a help "panel" from that help 
  2988.                file (ie, page within the book).  It has 3 templates depending 
  2989.                upon whether you want to attach a help file, detach a help file, 
  2990.                or display a panel within a help file. 
  2991.  
  2992.                RXHELP uses OS/2's Information Presentation Manager Facility. 
  2993.                For example, this book that you're reading is an example of IPF. 
  2994.                You use OS/2's Information Presentation Facility Compiler, 
  2995.                IPFC.EXE, to create a .HLP file (ie, write a script with the 
  2996.                imbedded IPF "tags" and compile it into a HLP file).  Then, you 
  2997.                can attach such a file to a window using RXHELP. 
  2998.  
  2999.                Each window can have a different HLP file attached to it.  Only 
  3000.                one help file can be attached to a given window. 
  3001.  
  3002.                Note:  You can attach a help file to a window, and then later 
  3003.                       attach a different help file to that same window.  But, 
  3004.                       if there are any Child Dialogs that share the same help 
  3005.                       file as the Main Window (ie, you didn't supply the 
  3006.                       HelpFilename arg when attaching a help file to the Child 
  3007.                       Dialog), then you should do a 'FREE' upon those Child 
  3008.                       Dialogs before ever changing the Main Window's help file.
  3009.  
  3010. Args 
  3011.  
  3012. If the first template is being used (ie, first arg is 'CREATE'), then this 
  3013. attaches a Help file to a window.  If HelpFilename is omitted, then it doesn't 
  3014. attach a new file, but instead shares the same help file that is attached to 
  3015. the Main Window.  Otherwise, this attaches the specified HelpFilename (ie, the 
  3016. name of some OS/2 Help file) to the window whose title matches WindowTitle. 
  3017. WindowTitle must be enclosed in quotes if there are spaces within the window 
  3018. title.  If WindowTitle is a null string (ie, use '""'), then the Main Window 
  3019. will be the one to which the help file is being attached.  You can call 
  3020. 'CREATE' at any time to change the help file attached to a window.  You do not 
  3021. need to 'FREE' a previous help file, except as noted above for Child Dialogs 
  3022. that share the Main Window, when you wish to subsequently change the Main 
  3023. Window's help file. 
  3024.  
  3025. If the second template is being used (ie, first arg is 'FREE'), then this 
  3026. detaches a Help file from the window whose title matches WindowTitle. 
  3027. WindowTitle must be enclosed in quotes if there are spaces within the window 
  3028. title.  If WindowTitle is a null string (ie, use '""'), then any help file is 
  3029. detached from the Main Window.  'FREE' only ever needs to be done as noted 
  3030. above. 
  3031.  
  3032. If the third template is being used, Panel is the panel number or name within 
  3033. the help file that you want displayed.  Panel must be enclosed in quotes if 
  3034. there are spaces within the panel name.  WindowTitle is the window whose help 
  3035. file is to be used to find the panel.  WindowTitle must be enclosed in quotes 
  3036. if there are spaces within the window title.  If WindowTitle is omitted, the 
  3037. Main Window is used. 
  3038.  
  3039. Note:  The name of a panel should not start with a numeric character, although 
  3040.        these may appear later in the name.  Also, you must not name a panel 
  3041.        such that the first 4 letters are CREA or FREE.
  3042.  
  3043. Returns 
  3044.  
  3045. This may return some errors as described in Errors. 
  3046.  
  3047. Examples 
  3048.  
  3049. /* This attaches the file "test.hlp" (in the current dir, or along the help 
  3050. path) to a window named "Main", and brings up a panel named "INFO" */ 
  3051.  
  3052. RXHELP 'CREATE' 'Main' 'test.hlp' 
  3053.  
  3054. RXHELP 'INFO' 'Main' 
  3055.  
  3056.  
  3057. ΓòÉΓòÉΓòÉ 6.7. RXQUERY ΓòÉΓòÉΓòÉ
  3058.  
  3059. Template       RXQUERY WindowTitle 
  3060.  
  3061. Description    This command returns (in the special REXX variable RC) a 0 if 
  3062.                the passed WindowTitle does not match an open window, or 1 if a 
  3063.                window with that title is open.  This can be used to check 
  3064.                whether a particular window is open. 
  3065.  
  3066. Args 
  3067.  
  3068. WindowTitle is a string to match with the title of any open window.  This must 
  3069. be enclosed in quotes if there are spaces within the window title. 
  3070.  
  3071. Returns 
  3072.  
  3073. 0 if the specified window is not open, or 1 if that window is open. 
  3074.  
  3075. Examples 
  3076.  
  3077. /* This gets the version and revision numbers and displays each separately */ 
  3078.  
  3079. RXVERS 
  3080. rev = RC 
  3081. PARSE rev ver rev 
  3082. RXSAY 'Version = 'ver 
  3083. RXSAY 'Revision = 'rev 
  3084.  
  3085.  
  3086. ΓòÉΓòÉΓòÉ 6.8. RXSAY ΓòÉΓòÉΓòÉ
  3087.  
  3088. Template       RXSAY Message '|' Type Heading 
  3089.  
  3090. Description    This command pops up a message box on the Desktop, displaying 
  3091.                the text that you specified after the RXSAY command keyword. 
  3092.                There will be one or more push buttons that the user can click 
  3093.                the mouse upon in order to manually dismiss the message box. 
  3094.                The box remains displayed, and your script is suspended, until 
  3095.                the user dismisses that box, at which time your script resumes 
  3096.                its processing (on the next REXX line after the call to RXSAY). 
  3097.  
  3098.                Use this instead of the REXX standard SAY command.  The SAY 
  3099.                command won't display anything because the REXX script isn't 
  3100.                being run from an OS/2 Command Prompt window, (and that's where 
  3101.                the standard SAY command tries to send its output, with the net 
  3102.                result that the output gets discarded).  In fact, you can't use 
  3103.                the PULL nor PARSE PULL commands either, or any other REXX 
  3104.                standard command that tries to get input or output from a 
  3105.                command line.  But then, that's why Rexx Dialog exists -- 
  3106.                because the former method is a lousy way to get user input and 
  3107.                display output, and you're going to want to use Rexx Dialog's PM 
  3108.                Interface instead.  Since Rexx Dialog offers other facilities to 
  3109.                open windows and display text, there are other ways of 
  3110.                displaying such, but RXSAY is the easiest and is a direct 
  3111.                replacement for the standard SAY command (mostly).  Just change 
  3112.                any reference from SAY to RXSAY, and you've changed a REXX 
  3113.                script to output via Desktop message boxes.  RXSAY doesn't 
  3114.                recognize any ANSI sequences to change color or move the cursor. 
  3115.                And sometimes programmers use the fact that SAY outputs to only 
  3116.                1 window in order to spread output of one "statement" across 
  3117.                several calls to SAY.  On the other hand, each call to RXSAY 
  3118.                produces a distinct message box.  So, the translation isn't 
  3119.                exact, but it's close enough.  Generally, what RXSAY is used for 
  3120.                is to display error messages, or to offer the user a simple 
  3121.                prompt, such as to ask him if he wants to overwrite an existing 
  3122.                file. 
  3123.  
  3124.                If you have a Main Window open (via the RXDLG command), then the 
  3125.                message box is attached to that window.  In this case, it won't 
  3126.                suspend other OS/2 applications, nor lockup the Desktop until 
  3127.                the message box is dismissed.  If no Main Window is open, the 
  3128.                message box pops up directly upon the Desktop, and the user must 
  3129.                dismiss it before he can do anything else from the Desktop. 
  3130.  
  3131.                RXSAY offers a choice of various pushbuttons that can be created 
  3132.                at the bottom of the message box, which the user can click upon 
  3133.                to dismiss the message box.  RXSAY will then return different 
  3134.                values depending upon which button the user clicked.  For 
  3135.                example, you can use RXSAY to present a box that displays a 
  3136.                question and offers the user a YES or NO button, and write your 
  3137.                REXX script to do different things based upon the returned RC. 
  3138.  
  3139. Args 
  3140.  
  3141. Message        The string that you want displayed.  Just like with the standard 
  3142.                SAY command, it can be a literal string, or a variable.  If you 
  3143.                intend to supply the Type arg, then you must put a | character 
  3144.                after the Message.  This character must be enclosed in quotes in 
  3145.                order to prevent the REXX Interpreter from misinterpreting it as 
  3146.                a mathematical OR symbol.  It's OK to omit blank spaces 
  3147.                inbetween the | and the Message and Type args, or even to 
  3148.                enclose all 3 in one set of quotes if you're supplying a literal 
  3149.                string for Message.  For example, all of the following are the 
  3150.                same: 
  3151.  
  3152.                RXSAY 'hello' '|' 1 
  3153.                RXSAY 'hello''|'1 
  3154.                RXSAY 'hello|' 1 
  3155.                RXSAY 'hello|1' 
  3156.  
  3157. Type           What Buttons (ie, OK, CANCEL, YES, NO, etc) to place at the 
  3158.                bottom of the message box, and also what graphic symbol to 
  3159.                display next to the message (ie, Question Mark, Stop Sign, 
  3160.                Warning Sign, etc).  If Type is omitted, then there are only an 
  3161.                OK button and a Stop Sign. 
  3162.  
  3163.                For the Type arg, pick any 1 of the following button groups, and 
  3164.                then pick out 1 of the graphic symbols, and add the two values 
  3165.                together. 
  3166.  
  3167.                BUTTONS 
  3168.                OK               0 
  3169.                OK and CANCEL        1 
  3170.                RETRY and CANCEL      2 
  3171.                ABORT, RETRY and IGNORE  3 
  3172.                YES and NO          4 
  3173.                YES, NO, and CANCEL     5 
  3174.                CANCEL            6 
  3175.                ENTER             7 
  3176.                ENTER and CANCEL      8 
  3177.  
  3178.                GRAPHIC SYMBOLS 
  3179.                None          0 
  3180.                Question Mark     16 
  3181.                Exclamation Mark   32 
  3182.                Asterisk        48 
  3183.                Stop Symbol      64 
  3184.  
  3185.                For example, set Type as 4+16 if you want YES and NO buttons 
  3186.                with a Question Mark symbol. 
  3187.  
  3188. Heading        The Heading that appears above the message.  If you don't supply 
  3189.                any Heading text, then a default heading is used which consists 
  3190.                of "Rexx Dialog x.x" where x.x is the version and revision 
  3191.                number of the Rexx Dialog release. 
  3192.  
  3193. Returns 
  3194.  
  3195. A number which represents which button the user pressed to dismiss the message 
  3196. box.  Each of the different buttons that you can include in the box not only 
  3197. dismisses the box, but also returns a different value, so your script knows 
  3198. which one the user selected.  Here are the values that each button returns. 
  3199.  
  3200. OK       1 
  3201. CANCEL    2 
  3202. ABORT     3 
  3203. RETRY     4 
  3204. IGNORE    5 
  3205. YES      6 
  3206. NO       7 
  3207. ENTER     9 
  3208.  
  3209. Examples 
  3210.  
  3211. /* Pop up a dialog with the question "Is your name Marvin"? Note that we stored 
  3212. the name 
  3213.   in a variable.  We also include YES and NO buttons, and a Question Mark 
  3214. symbol. */ 
  3215. txt='Marvin' 
  3216. RXSAY 'Is your name 'txt'?|' 20 
  3217. IF RC = 6 THEN RXSAY 'Yes, your name is 'txt'.' 
  3218.  
  3219. Note:  Don't forget the | character, somewhere within quotes, inbetween the 
  3220.        Message and the Type args.  Otherwise, the Type will be misinterpreted 
  3221.        as part of the message and displayed in the message box after the Message.
  3222.  
  3223.  
  3224. ΓòÉΓòÉΓòÉ 6.9. RXSET ΓòÉΓòÉΓòÉ
  3225.  
  3226. Template       RXSET WindowTitle GroupNum ControlNum Operation Value 
  3227.                RXSET WindowTitle WindowOperation Value 
  3228.  
  3229. Description    This command sets the specified control within the specified 
  3230.                Group and Window to a particular value.  In other words, it can 
  3231.                be used to set a currently displayed control to a new value. 
  3232.                The second template is used to change a window's 
  3233.                characteristics. 
  3234.  
  3235. Args 
  3236.  
  3237. WindowTitle is a string to match with the title of any open window.  This must 
  3238. be enclosed in quotes if there are spaces within the window title.  WindowTitle 
  3239. can be an empty string, ie '""', in which case, the Main Window is used for the 
  3240. operation. 
  3241.  
  3242. GroupNum is the Group containing the desired control, where the first Group in 
  3243. the window is 1. 
  3244.  
  3245. ControlNum is the desired control, where the first control in the Group is 1. 
  3246. If you want the Operation to be performed upon all controls within the Group, 
  3247. then pass a ControlNum of 0. 
  3248.  
  3249. Operation is the operation that you desire as so: 
  3250.  
  3251. VAL            Change the value of the control to the Value string. 
  3252.  
  3253. HIDE           Hide the control (ie, visually remove it from the display).  The 
  3254.                Value string is a 1 if you want to hide the Label for the 
  3255.                control (as well as the Value printout for a slider, and 
  3256.                ALL\NONE buttons with multiple select lists and checkmark 
  3257.                Groups), or 0 if you only want to hide the control itself.  If 
  3258.                ControlNum is 0, then all controls in the Group are hidden, as 
  3259.                well as any surrounding groupbox.  For a MENU group, the whole 
  3260.                menu is always hidden. 
  3261.  
  3262. SHOW           Show the control (if it was hidden).  The Value string is a 1 if 
  3263.                you want to show the Label for the control (as well as the Value 
  3264.                printout for a slider, and ALL\NONE buttons with multiple select 
  3265.                lists and checkmark Groups), or 0 if you only want to show the 
  3266.                control itself.  If ControlNum is 0, then all controls in the 
  3267.                Group are shown, as well as any surrounding groupbox.  For a 
  3268.                MENU group, the whole menu is always shown. 
  3269.  
  3270. SIZE           Size a control (ie, visually change its width and/or height). 
  3271.                The Value string specifies the new width and height (in pels) 
  3272.                for the control.  If the width is set to 0, then the width is 
  3273.                not changed (ie, the original width is retained).  If the height 
  3274.                is set to 0 (or omitted), then the height is not changed.  If 
  3275.                ControlNum is 0, then all controls in the Group are sized to the 
  3276.                specified width and height, as well as any surrounding groupbox. 
  3277.                A MENU group can't be sized. 
  3278.  
  3279.                Note:  The SIZE command doesn't properly relocate labels and 
  3280.                       groupboxes for ENTRY nor SLIDER controls.  Furthermore, a 
  3281.                       LIST box's Height should be set to some multiple of 16. 
  3282.                       The SIZE command is provided primarily for sizing the 
  3283.                       width of TEXT or DROPBOX controls, or the width and 
  3284.                       height of LISTBOX controls.
  3285.  
  3286. MOVE           Move a control (ie, visually change its position).  The Value 
  3287.                string specifies the X and Y offsets (in pels from the current 
  3288.                position) to move the control.  If X is set to 0, then the 
  3289.                vertical position is not changed.  If Y is set to 0 (or 
  3290.                omitted), then the horizontal position is not changed.  If 
  3291.                ControlNum is 0, then all controls in the Group are moved the 
  3292.                specified amount, as well as any surrounding groupbox.  A MENU 
  3293.                group can't be moved. 
  3294.  
  3295.                Note:  If you're using the SIZE or MOVE commands upon only 1 
  3296.                       control within a group, and that control is encircled by 
  3297.                       a groupbox, then you should HIDE the control before 
  3298.                       issuing the SIZE or MOVE commands, and then SHOW the 
  3299.                       control afterwards.  This is necessary due a peculiarity 
  3300.                       in the way that OS/2 GroupBoxes handle repainting. 
  3301.                       Failure to follow this guideline may result in seeing 
  3302.                       remnants of the original control's graphic not properly 
  3303.                       erased inside of the groupbox.  If the encircling 
  3304.                       groupbox is a separate GROUP from the control, then 
  3305.                       HIDE/SHOW the groupbox instead of the control.  If you're 
  3306.                       issuing several SIZE and/or MOVE commands, upon several 
  3307.                       controls within a group, but one control at a time, you 
  3308.                       only need to HIDE those controls (or the groupbox) once 
  3309.                       before the MOVE/SIZE commands, and SHOW them afterwards.
  3310.  
  3311. ADD            Add the value string (ie, text for an item) to a LIST or DROP 
  3312.                box, or add a new MENU bar.  When adding a new menu bar, the old 
  3313.                menu bar is deleted. 
  3314.  
  3315. DEL            Delete a particular item (or all items) from a LIST or DROP box, 
  3316.                or a MENU label.  When deleting a menu label, if it happens to 
  3317.                be a Menu Heading, all of the drop down items\subitems for that 
  3318.                heading are also deleted.  If the label happens to be an Item 
  3319.                with SubItems, all of the SubItems are deleted.  Note that the 
  3320.                numbering of the labels doesn't change simply because you 
  3321.                deleted items, subitems, or headings.  You still must count 
  3322.                those deleted labels when counting the menu labels (unless you 
  3323.                create an entirely new menubar -- then the numbering of the 
  3324.                labels is reset). 
  3325.  
  3326. FLAG           Set Flags for the Group.  In this case, the Value string will be 
  3327.                the Flags arg as you would specify it for RXFLAGS.  But, the 
  3328.                only Flags you may set via RXSET are END, INDEX, and BOOL.  The 
  3329.                ControlNum arg is irrelevant. 
  3330.  
  3331. For the second template of RXSET, WindowOperation can be one of the following: 
  3332.  
  3333. HIDE           Hide the window and all of its controls (ie, visually remove it 
  3334.                from the display).  If the Main Window, then all of the child 
  3335.                dialogs get hidden too. 
  3336.  
  3337. SHOW           Show the window (if it was hidden). 
  3338.  
  3339. MOVE           Move the window.  In this case, the Value string will be the X 
  3340.                position and Y position. 
  3341.  
  3342. SIZE           Resize the window.  In this case, the Value string will be the 
  3343.                Width and Height. 
  3344.  
  3345. STATE          Change the window's state.  In this case, the Value string will 
  3346.                be a 0 to minimize the window, 1 to maximize the window, or 2 to 
  3347.                restore the window.  If Value arg is omitted, the window is 
  3348.                minimized. 
  3349.  
  3350. ACTIVE         Brings the window to the front of the screen, and makes it 
  3351.                active. 
  3352.  
  3353. FLAG           Set Flags for the window.  In this case, the Value string will 
  3354.                be the Flags arg as you would specify it to RXDLG.  But, the 
  3355.                only Flags you may set via RXSET are NOCLOSE, MODAL, KEYS, ONCE, 
  3356.                and RESULT. 
  3357.  
  3358. TIME           Sets the time-out for the window.  In this case, the Value 
  3359.                string will be the desired time-out in milliseconds.  (1000 
  3360.                milliseconds = 1 second, 1000*60 milliseconds = 1 minute, etc). 
  3361.                If you pass a Value of 0 (or omit the Value arg), then the 
  3362.                time-out function for the window is turned off, and the timer is 
  3363.                stopped.  A non-zero time-out will start the timer.  See Time 
  3364.                out. 
  3365.  
  3366. Value is the value for the Operation.  Note that you do not need to place any 
  3367. Value string inside of 2 sets of quotes, even if it is a literal string with 
  3368. imbedded spaces. 
  3369.  
  3370. Here is what Value string specifies for each Group Type when the Operation is 
  3371. VAL: 
  3372.  
  3373. PUSH           Value is a 1 if the button is to be chosen as the default, or a 
  3374.                0 if the button is to be unselected.  Note that if a button is 
  3375.                selected for default, all other buttons in the Group are 
  3376.                automatically unselected. 
  3377.  
  3378. RADIO          Value is a 1 if the button is to be selected, or a 0 if the 
  3379.                button is to be unselected.  Note that if a button is selected, 
  3380.                all other buttons in the Group are automatically unselected. 
  3381.  
  3382. CHECK          Value is a 1 if the button is to be checked, or a 0 if the 
  3383.                button is to be unchecked. 
  3384.  
  3385. ENTRY          Value is the text to set into the entry box.  The text should 
  3386.                not contain a | character.  Omitting the text will blank the 
  3387.                box. 
  3388.  
  3389. DROP           Value is the text to set into the entry box.  The text should 
  3390.                not contain a | character.  Omitting the text will blank the 
  3391.                box. 
  3392.  
  3393. LIST           Value is the text of the item to select or deselect.  This text 
  3394.                should be followed by a | character, and then either a 1 or 0 to 
  3395.                select or deselect any item that matches the text.  If you omit 
  3396.                the text before the | character, then all items are selected if 
  3397.                a 1 follows the |, or all items are deselected if a 0 follows 
  3398.                the |. 
  3399.  
  3400.                Note:  For single-select list boxes, only 1 item can be selected 
  3401.                       at a time, and all other items will be automatically deselected.
  3402.  
  3403. SPIN           Value is the numeric value to which the spin will be set. 
  3404.  
  3405. SLIDER         Value is the numeric value to which the slider (knob) will be 
  3406.                set. 
  3407.  
  3408. TEXT           Value is the phrase to display, and ControlNum is the phrase 
  3409.                number to replace.  If the new phrase isn't as wide as the 
  3410.                original WidthOfPhrase (ie, when the TEXT Group was created), 
  3411.                text may be visually clipped. 
  3412.  
  3413. MENU           Value is the text to set into the menu label.  The text should 
  3414.                not contain a | character.  The ControlNum arg to RXSET is the 
  3415.                menu label number.  See Menu Group for how to count the labels. 
  3416.  
  3417. GROUP          Value is the text to set for the groupbox label.  The text 
  3418.                should not contain a | character. 
  3419.  
  3420. Note:  RESULT Type can't be used with a VAL Operation.
  3421.  
  3422. Here is what Value string specifies for each Group Type when the Operation is 
  3423. DEL: 
  3424.  
  3425. LIST or DROP   Value is the text of the item (in the list) to delete.  If you 
  3426.                omit the Value arg (ie, don't supply a string to match), then 
  3427.                all items in the list are deleted (ie, the list is "emptied"). 
  3428.  
  3429. MENU           There is no Value arg.  The ControlNum arg specifies the menu 
  3430.                label to delete.  Note that you can delete the entire menu bar 
  3431.                by passing ControlNum of 0 (ie, specify that you want the delete 
  3432.                action applied to all menus in the Group). 
  3433.  
  3434. Note:  Other Types can't be used with a DEL Operation.
  3435.  
  3436. Here is what Value string specifies for each Group Type when the Operation is 
  3437. ADD: 
  3438.  
  3439. LIST or DROP   Value is the text of the item to add to the list.  This text 
  3440.                should be followed by a | character, and then a number that 
  3441.                specifies how you want the item added to the list.  If you want 
  3442.                the item added to the end of the list, specify -1.  If you want 
  3443.                the item added in ascending alphabetical order, specify -2.  If 
  3444.                you want the item added in descending alphabetical order, 
  3445.                specify -3.  All positive numbers represent the offset in the 
  3446.                list where you want the item placed, with 0 being at the 
  3447.                beginning of the list.  For example, if you want to add the item 
  3448.                as the tenth item in the list, specify 9 (because 0 is the 
  3449.                first). 
  3450.  
  3451.                Note:  Put quotes around any negative numbers that you pass, for 
  3452.                       example '-1'.  OS/2 REXX appears to have another bug 
  3453.                       related to recognizing the minus sign for negative numbers.
  3454.  
  3455. MENU           The Value arg are the HELP Flag, followed by the REXX variable 
  3456.                names where each dropdown menu is defined.  In other words, the 
  3457.                Value arg is just like how you would specify the RXINFO string 
  3458.                for a MENU Group, except that instead of the TotalMenus count in 
  3459.                front of the variable names, you specify the 'HELP' flag 
  3460.                followed by a | character (or just omit the 'HELP' before the | 
  3461.                character if you don't desire a help menu).  Note that you must 
  3462.                set up all of the stem variables as you would if you were 
  3463.                creating a MENU Group in a window. 
  3464.  
  3465. Note:  Other Types can't be used with a ADD Operation.
  3466.  
  3467. Returns 
  3468.  
  3469. This could return an error.  See Errors for details. 
  3470.  
  3471. Examples 
  3472.  
  3473. /* Assume that the first Group in a window called "Window 1" is an ENTRY Group, 
  3474. and we want to change the contents of the 3rd entry to the string "hello there" 
  3475. */ 
  3476.  
  3477. RXSET '"Window 1"' 1 3 'VAL' 'hello there' 
  3478.  
  3479.  
  3480. ΓòÉΓòÉΓòÉ 6.10. RXVERS ΓòÉΓòÉΓòÉ
  3481.  
  3482. Template       RXVERS 
  3483.  
  3484. Description    This command returns a string (in the special REXX variable RC) 
  3485.                that identifies the version and revision numbers (separated by a 
  3486.                space) of RXDLG.DLL.  For example, if the version/revision 
  3487.                number of Rexx Dialog is 1.0, then the returned string is '1 0'. 
  3488.  
  3489. Args 
  3490.  
  3491. None. 
  3492.  
  3493. Returns 
  3494.  
  3495. The version and revision numbers as one string. 
  3496.  
  3497. Examples 
  3498.  
  3499. /* This gets the version and revision numbers and displays each separately */ 
  3500.  
  3501. RXVERS 
  3502. rev = RC 
  3503. PARSE rev ver rev 
  3504. RXSAY 'Version = 'ver 
  3505. RXSAY 'Revision = 'rev 
  3506.  
  3507.  
  3508. ΓòÉΓòÉΓòÉ 7. PM Lockups ΓòÉΓòÉΓòÉ
  3509.  
  3510. While your script is not "sleeping" within a call to RXDLG, and the script has 
  3511. (NOCLOSE) windows open, it may be preventing other PM apps from multitasking 
  3512. (due to OS/2 2.X PM having a single-threaded message queue).  Only when RXDLG 
  3513. is allowed to perform user interaction (ie, when you call RXDLG to perform some 
  3514. operation that allows user interaction with those open windows) can you be 
  3515. assured that your script isn't locking up PM. 
  3516.  
  3517. So, if your script opens NOCLOSE windows, then whenever RXDLG returns, your 
  3518. script should either close all open windows (so that the user can't interact 
  3519. with them and perhaps cause a PM lockup while your script is busy doing 
  3520. something), or finish its work quickly and get back to calling RXDLG with some 
  3521. operation that allows user interaction. 
  3522.  
  3523. But, what if your script doesn't want to close all windows, and yet, needs to 
  3524. do some processing that may take a long time?  In order to avoid any lockup 
  3525. situation, you should periodically call RXDLG with the following call: 
  3526.  
  3527. RXDLG '""' 255 
  3528.  
  3529. Note that the WindowTitle arg is 2 double-quotes inside of single quotes.  An 
  3530. operation of 255 cleans out the PM message queue so that no PM lockup will 
  3531. occur.  The user will not be allowed to interact with any open windows in this 
  3532. call to RXDLG (other than to resize/maximize/minimize the main window), so it 
  3533. doesn't effect REXX variables or the window states at all. 
  3534.  
  3535. For example, assume that you have some open windows, but you need to read in 
  3536. the lines of a text file.  Here's an example where RXDLG is called after 
  3537. reading in every 10 lines in order to clean out the PM message queue.  This 
  3538. will allow the user to switch to and use other PM apps while your script is 
  3539. reading in the lines of the text file. 
  3540.  
  3541. IF ''\=STREAM(FileName,'c','query exists') THEN DO 
  3542.   code=LINEIN(FileName,1,0) 
  3543.   nLines=0 
  3544.   DO WHILE LINES(FileName) 
  3545.    Lin.nLines=LINEIN(FileName) 
  3546.    nLines=nLines+1 
  3547.    IF (nLines%10) = 0 THEN RXDLG '""' 255 
  3548.   END 
  3549.   code=STREAM(FName,'c','close') 
  3550. END 
  3551.  
  3552. Note:  Never use any REXX function library "sleep" function that makes a call 
  3553.        to OS/2's DosSleep() routine.  PM programs are not allowed to use 
  3554.        DosSleep() and doing so will lockup the Desktop.  Calling RXDLG 
  3555.        automatically puts your program to sleep when the user is not 
  3556.        interacting with it, so there is no need to use any sleep function to 
  3557.        halt your script at any point.  Simply call RXDLG with an operation that 
  3558.        does user interaction.  If you need to wakeup at a certain time in order 
  3559.        to check upon some condition, then setup a time-out on a window (perhaps 
  3560.        making it MODAL so that the user won't be able to change to another 
  3561.        window).  Then check the return RXID and RXSUBID both for 0 in order to 
  3562.        detect a time-out.  If you need to ensure that the user can't interfere 
  3563.        with the time-out, then I suggest creating a window with something 
  3564.        simple, like a TEXT group, making the window MODAL, and hiding that 
  3565.        window.  Then, when you need to do a time-out, use RXSET to set the 
  3566.        time-out, and then call RXDLG with an operation of 0 and specify that 
  3567.        window.  After the time-out, you can use RXSET to disable further 
  3568.        time-outs for that window.
  3569.  
  3570.  
  3571. ΓòÉΓòÉΓòÉ 8. Launching programs ΓòÉΓòÉΓòÉ
  3572.  
  3573. Consider if you wanted to launch some OS/2 program (ie, not another REXX 
  3574. script) from a Rexx Dialog script.  For example, let's say that you wanted to 
  3575. invoke the copy command on the file named BLORT to copy it to BLORT2.  From a 
  3576. regular REXX script (ie, started from an OS/2 Command Prompt), you could do the 
  3577. following: 
  3578.  
  3579. 'COPY blort blort2' 
  3580.  
  3581. If you put the above line in a Rexx Dialog script, you'll see the error message 
  3582. REXX dialog unknown command: COPY. 
  3583.  
  3584. The problem is that REXX is passing the above statement to Rexx Dialog, and 
  3585. Rexx Dialog doesn't have a COPY command.  Normally, REXX scripts are run from 
  3586. the OS/2 command line, and so REXX would pass this command to the OS/2 command 
  3587. line, which does have a COPY command.  But, when running a script with RX.EXE, 
  3588. REXX passes everything which it doesn't recognize as a built-in command to Rexx 
  3589. Dialog.  In this case, you need to specifically direct the above instruction to 
  3590. the OS/2 shell.  You do so by putting ADDRESS CMD before the line that you want 
  3591. to send to the OS/2 shell (ie, CMD is the REXX environment name for the OS/2 
  3592. shell, and ADDRESS tells REXX to send the following line to that environment 
  3593. instead of letting Rexx Dialog try to implement that line).  So the line would 
  3594. be: 
  3595.  
  3596. ADDRESS 'CMD' 'COPY blort blort2' 
  3597.  
  3598. If you have several instructions which you need to send to the OS/2 shell, you 
  3599. can change the environment permanently by just putting ADDRESS 'CMD' as a 
  3600. self-contained instruction.  But afterward, you need to change the environment 
  3601. back to Rexx Dialog's environment (which is 'RXDLG') before calling any Rexx 
  3602. Dialog commands again.  You can toggle back to Rexx Dialog's environment by 
  3603. simply using ADDRESS alone, or use ADDRESS 'RXDLG'.  For example, here we 
  3604. change the environment to the OS/2 Shell, execute a few copy commands, and then 
  3605. return the environment to Rexx Dialog. 
  3606.  
  3607. ADDRESS 'CMD' 
  3608. 'COPY blort blort2' 
  3609. 'COPY blort2 blort' 
  3610. ADDRESS 
  3611.  
  3612. If you're launching other programs (ie, not REXX scripts) from a Rexx Dialog 
  3613. script, REXX suspends execution of your script until such time as that launched 
  3614. program terminates.  The numeric value that this program returned to OS/2 is 
  3615. then returned to your REXX script in the RC variable. 
  3616.  
  3617. But remember that a Rexx Dialog script must not do any kind of waiting or 
  3618. sleeping while it's not within RXDLG, or this could lock up the PM desktop. 
  3619. Unfortunately, that means that if the launched program does its own waiting for 
  3620. user input, or takes a long time to execute, then this could lock up the 
  3621. desktop. 
  3622.  
  3623. Take the case with launching some Presentation Manager program from a Rexx 
  3624. Dialog script.  When your Rexx Dialog script calls that PM program, control 
  3625. isn't returned to your script until the PM program terminates, and of course, 
  3626. since most PM programs hang around until the enduser dismisses them, that means 
  3627. that your Rexx Dialog script is stuck in that statement which launched the PM 
  3628. program. Of course, that also means that your Rexx Script isn't calling RXDLG, 
  3629. and therefore, if the enduser attempts to do something with any Rexx Dialog 
  3630. windows your script has opened, then a PM lockup will occur. The solution is to 
  3631. use OS/2's START command to launch the program. This causes the program to be 
  3632. launched as a separate process, and control returns to your script immediately 
  3633. (ie, the launched program is entirely independent of the script, and your 
  3634. script can then proceed to do other things, such as call RXDLG to maintain its 
  3635. user interface). Whenever launching PM programs from a Rexx Dialog script, or 
  3636. other Rexx Dialog scripts by invoking RX.EXE, always use OS/2'S START command. 
  3637. So if you have a PM program called BLORT.EXE in your C:\OS2\APPS drawer, here's 
  3638. how you launch it: 
  3639.  
  3640. ADDRESS 'CMD start' 'c:\os2\apps\blort.exe' 
  3641.  
  3642. The one drawback to using START is, if the launched program returns an error 
  3643. code, you won't get it.  Instead, you'll always get a 0 (ie, success) return 
  3644. from the above REXX statement, except for if OS/2 itself can't startup the 
  3645. program. 
  3646.  
  3647. Typically, OS/2 command line programs (ie, not PM) just perform one operation, 
  3648. perhaps using arguments passed from the command line, and then terminate.  It's 
  3649. OK to call such a program by simply specifying its name after ADDRESS CMD (ie, 
  3650. how you'd normally launch another program from a Rexx script).  For example, if 
  3651. you have a command line "TOUCH.EXE" program which takes one argument, the name 
  3652. of a file whose creation date is to be set to the current date, and the program 
  3653. does just that and exits without needing to prompt for user input itself, then 
  3654. you may call it as so to update the file "BLORT.TXT'. 
  3655.  
  3656. ADDRESS 'CMD' 'touch.exe blort.txt' 
  3657.  
  3658. Control won't be returned to your script until after the TOUCH program 
  3659. terminates, and the return code will be whatever TOUCH returned to OS/2.  If 
  3660. this is not 0, then this will cause the ERROR condition to be raised.  (Of 
  3661. course, if the program never returns 0 even for successful operation, you can 
  3662. always use the START command to launch it as its own process with its error 
  3663. code tossed away.  Or you can monkey with RXERR or SIGNAL ON ERROR instructions 
  3664. before you launch the program, to try to ignore an error return). 
  3665.  
  3666. On the other hand, if this TOUCH program involved a very lengthy process during 
  3667. which you didn't want to tie up the desktop, and didn't care about losing the 
  3668. error return code, you could use the START command to launch it as its own 
  3669. process. 
  3670.  
  3671. You must use the start command when launching another Rexx Dialog script.  For 
  3672. example, to launch the Rexx Dialog script BLORT.CMD: 
  3673.  
  3674. ADDRESS 'CMD start' 'rx.exe blort.cmd' 
  3675.  
  3676.  
  3677. ΓòÉΓòÉΓòÉ 9. Time-out ΓòÉΓòÉΓòÉ
  3678.  
  3679. A time-out can be set for a window which, when your script is sleeping in RXDLG 
  3680. (ie, you performed some operation that does user interaction) and the user has 
  3681. not done anything with that window that would case RXDLG to return during that 
  3682. specified time-out, then RXDLG automatically returns to your script.  In this 
  3683. case, RXID is set to 0 (ie, just like with the ENTER key if the RESULT Flag is 
  3684. set, or other keys if the KEYS Flag is set), and RXSUBID is set to 0. 
  3685.  
  3686. If you wish to change the time-out value, you can do so by calling RXSET with a 
  3687. WindowOperation of 'TIME' and the desired time-out value.  If you set a 
  3688. time-out value of 0, then the time-out function for that window is disabled 
  3689. (and any time-out that may have already occurred is cleared).  Setting a 
  3690. time-out value of anything but 0 causes a time-out for that window to be 
  3691. enabled (and if the time-out was previously enabled, any time-out that may have 
  3692. already occurred is cleared). 
  3693.  
  3694. While your script is not sleeping in RXDLG, the timer will still be counting 
  3695. down for the next time-out.  So, if another time-out occurs while your script 
  3696. is doing some processing, then upon the next call to RXDLG, your script will 
  3697. immediately return with another time-out.  Even if more than 1 time-out occurs 
  3698. while your script is doing some processing (ie, you have a time-out of 10 
  3699. milliseconds, but your script takes 50 milliseconds to do some processing 
  3700. before calling RXDLG again), you'll only be notified of a single time-out.  So, 
  3701. the time-out should not be used as an accurate clock of elapsed time. 
  3702.  
  3703. Setting a time-out value of anything but 0 clears out any time-out that may 
  3704. have occurred while your script was doing some processing.  So, if you wish to 
  3705. "rearm" the time-out before calling RXDLG, simply set the time-out value with 
  3706. RXSET before calling RXDLG. 
  3707.  
  3708. If you want a countdown timer (ie, the timer counts down once, and then is 
  3709. automatically disabled), then set the ONCE Flag for the Window.  This ensures 
  3710. that each time you set a time-out with RXSET, you'll receive one time-out at 
  3711. most. 
  3712.  
  3713. The time-out value is specified in milliseconds. 
  3714.  
  3715.  
  3716. ΓòÉΓòÉΓòÉ 10. Keyboard Input ΓòÉΓòÉΓòÉ
  3717.  
  3718. If you set the KEYS Flag for a window, whenever that window has the focus (ie, 
  3719. the window itself and not some control within it) and the user presses some key 
  3720. combo upon the computer's keyboard, RXDLG will return.  RXWIND will be set to 
  3721. the title of the window which was active when the user pressed the key combo. 
  3722. RXID will be 0 or a negative number depending upon whether the user held down 
  3723. the ALT, SHIFT, and/or CTRL keys when he pressed another key, and whether the 
  3724. key is a printable key (such as "s") or an unprintable key (such as the HOME 
  3725. key). 
  3726.  
  3727. Note:  The ALT, SHIFT, or CTRL keys, pressed by themselves, do not cause RXDLG 
  3728.        to return.  These are "modifier" keys, and only effect the value of RXID 
  3729.        returned when the user presses another key in combination with these modifiers.
  3730.  
  3731. When RXDLG returns, it does NOT close the window, even if that window did not 
  3732. specify the NOCLOSE flag.  The exception to this is pressing the ESC or ENTER 
  3733. keys if the window's RESULT Flag is set. 
  3734.  
  3735. When the user presses a printable key, without the CTRL or ALT keys held down, 
  3736. then RXID is 0, and RXSUBID is that character.  For example, if he presses the 
  3737. 'd' key alone, then RXSUBID is 'd'.  If he holds down the shift key, then the 
  3738. shifted character printed on the key is returned.  For example, if he holds 
  3739. down the SHIFT while pressing 'd', then RXSUBID is 'D'.  If he holds the SHIFT 
  3740. while pressing the '1' key, then RXSUBID is '!'. 
  3741.  
  3742. If the user holds the ALT key while pressing a printable character, then RXID 
  3743. is -1, and RXSUBID is that character.  If he also holds the SHIFT key, that 
  3744. will cause RXSUBID to be the shifted character as above. 
  3745.  
  3746. If the user holds the CTRL key while pressing a printable character, then RXID 
  3747. is -2, and RXSUBID is that character.  If he also holds the SHIFT key, that 
  3748. will cause RXSUBID to be the shifted character as above. 
  3749.  
  3750. If the user holds both the ALT and CTRL keys while pressing a printable 
  3751. character, then RXID is -3, and RXSUBID is that character.  If he also holds 
  3752. the SHIFT key, that will cause RXSUBID to be the shifted character as above. 
  3753.  
  3754. If the user presses an unprintable character without the CTRL, ALT, or SHIFT 
  3755. keys held down, then RXID is -4, and RXSUBID is a "virtual key number".  Here 
  3756. are the virtual key numbers for the following unprintable characters: 
  3757.  
  3758. Break               4 
  3759.  
  3760. BackSpace           5 
  3761.  
  3762. TAB                 6 
  3763.  
  3764. BackTAB             7 
  3765.  
  3766. Pause               13 
  3767.  
  3768. Caps Lock           14 
  3769.  
  3770. Page Up             17 
  3771.  
  3772. Page Down           18 
  3773.  
  3774. End                 19 
  3775.  
  3776. Home                20 
  3777.  
  3778. Left                21 
  3779.  
  3780. Up                  22 
  3781.  
  3782. Right               23 
  3783.  
  3784. Down                24 
  3785.  
  3786. Print Screen        25 
  3787.  
  3788. Insert              26 
  3789.  
  3790. Delete              27 
  3791.  
  3792. Scroll Lock         28 
  3793.  
  3794. Num Lock            29 
  3795.  
  3796. SysRq               31 
  3797.  
  3798. F1                  32 
  3799.  
  3800. F2                  33 
  3801.  
  3802. F3                  34 
  3803.  
  3804. F4                  35 
  3805.  
  3806. F5                  36 
  3807.  
  3808. F6                  37 
  3809.  
  3810. F7                  38 
  3811.  
  3812. F8                  39 
  3813.  
  3814. F9                  40 
  3815.  
  3816. F10                 41 
  3817.  
  3818. F11                 42 
  3819.  
  3820. F12                 43 
  3821.  
  3822. F13                 44 
  3823.  
  3824. F14                 45 
  3825.  
  3826. F15                 46 
  3827.  
  3828. F16                 47 
  3829.  
  3830. F17                 48 
  3831.  
  3832. F18                 49 
  3833.  
  3834. F19                 50 
  3835.  
  3836. F20                 51 
  3837.  
  3838. F21                 52 
  3839.  
  3840. F22                 53 
  3841.  
  3842. F23                 54 
  3843.  
  3844. F24                 55 
  3845.  
  3846. If the user holds the ALT key while pressing an unprintable character, then 
  3847. RXID is -5, and RXSUBID is the virtual key number as described above. 
  3848.  
  3849. If the user holds the CTRL key while pressing an unprintable character, then 
  3850. RXID is -6, and RXSUBID is the virtual key number as described above. 
  3851.  
  3852. If the user holds both the ALT and CTRL keys while pressing an unprintable 
  3853. character, then RXID is -7, and RXSUBID is the virtual key number as described 
  3854. above. 
  3855.  
  3856. If the user holds the SHIFT key while pressing an unprintable character, then 
  3857. RXID is -8, and RXSUBID is the virtual key number as described above. 
  3858.  
  3859. If the user holds both the ALT and SHIFT keys while pressing an unprintable 
  3860. character, then RXID is -9, and RXSUBID is the virtual key number as described 
  3861. above. 
  3862.  
  3863. If the user holds both the CTRL and SHIFT keys while pressing an unprintable 
  3864. character, then RXID is -10, and RXSUBID is the virtual key number as described 
  3865. above. 
  3866.  
  3867. If the user holds the ALT, CTRL, and SHIFT keys while pressing an unprintable 
  3868. character, then RXID is -11, and RXSUBID is the virtual key number as described 
  3869. above. 
  3870.  
  3871. If the user presses the ESC key, RXID is -12, and RXSUBID is 0. 
  3872.  
  3873. If the user presses the ENTER key, RXID is 0, and RXSUBID is 10. 
  3874.  
  3875. Note:  If the user clicks upon the window's CLOSE ICON, RXID is -98, and 
  3876.        RXSUBID is 0.  If the window's NEWSIZE flag is set, and the window is 
  3877.        resized, RXID is -20 and RXSUBID is 0.  If the script is launched by an 
  3878.        app other than RX.EXE, and the app wants the script to abort, RXID is - 
  3879.        99, and RXSUBID is 0.
  3880.  
  3881. PM siphons off some key combos for operation of windows.  For example, pressing 
  3882. the ALT key usually activates a window's menu bar.  And CTRL + ESC switches 
  3883. between sessions.  F1 activates any Help file attached to a window.  Etc. 
  3884. These key combos are never seen by your script. 
  3885.  
  3886. Normally, you'll use ENTRY, DROP, and other PM controls to get strings of user 
  3887. input.  Use of KEYS flag is meant to be used for "keyboard commands".  For 
  3888. example, you can set KEYS for your Main Window, and when the user presses the 
  3889. ALT and "f" keys, you can bring up the File Dialog (ie, via RXFILE) as part of 
  3890. some sort of file operation.  Each key combo will initiate a different 
  3891. operation in your script.  By using mnuemonic symbols (ie, ~ placed before the 
  3892. letter that you wish underlined in any label for a control), and setting the 
  3893. KEYS Flag, you can identity and implement keyboard shortcuts that will 
  3894. implement the same operations as the controls in that window. 
  3895.  
  3896. Rexx Dialog ignores key releases.  Only key down is detected. 
  3897.  
  3898.  
  3899. ΓòÉΓòÉΓòÉ 10.1. ESC and ENTER Keys ΓòÉΓòÉΓòÉ
  3900.  
  3901. If the RESULT Flag is set for a window, then when the window has the focus and 
  3902. the user presses the ESC or ENTER key, RXDLG returns.  RXID and RXSUBID are set 
  3903. as described in Keyboard Input.  But, all of the other variables are set per 
  3904. this window's Groups as well, and if the window doesn't have its NOCLOSE Flag 
  3905. set, the window is closed.  Also, the first RESULT Group (if present) in that 
  3906. window is setup in a FAILURE state if ESC was pressed, or SUCCESS state if the 
  3907. ENTER key was pressed. 
  3908.  
  3909. Note:  When a control within the window has the focus, the ESC and ENTER keys 
  3910.        instead work with that control (regardless of whether you specified the 
  3911.        RESULT Flag).  The dialog window itself must have the focus (ie, which 
  3912.        happens automatically after the user has finished manipulating a control 
  3913.        by pressing the ENTER or ESC keys.  The ESC and ENTER keys can always be 
  3914.        used to deactivate a control and return the focus back to the window 
  3915.        itself.  The ENTER key will usually cause a Group with its END Flag to 
  3916.        force RXDLG to return, whereas the ESC key will not).
  3917.  
  3918.  
  3919. ΓòÉΓòÉΓòÉ 11. Positioning a window ΓòÉΓòÉΓòÉ
  3920.  
  3921. If you double-click the mouse 2 button anywhere in a window, this pushs the 
  3922. window down to the lower left corner of the Main Window (if a Child Dialog) or 
  3923. the Desktop (if a Main Window).  Since Child Dialogs open inside of the Main 
  3924. Window, sometimes a situation may happen where the titlebar of the Child Dialog 
  3925. is beyond the border of the Main Window (and therefore inaccessible by the 
  3926. mouse unless you can resize the Main Window to get to that titlebar).  Clicking 
  3927. the mouse 2 button twice is an easy way to drop the window down to the lower 
  3928. left corner, where the Child Dialog's controls will usually be more accessible. 
  3929.  
  3930.  
  3931. ΓòÉΓòÉΓòÉ 12. Resizing a window ΓòÉΓòÉΓòÉ
  3932.  
  3933. If the window's NEWSIZE flag is set, then after the user resizes that window, 
  3934. RXDLG returns with RXWIND set to the name of the window that was resized, RXID 
  3935. = -20 (and RXSUBID = 0), and the window's Dimensions string is updated with the 
  3936. width and height (as well as X and Y position of the lower left corner relative 
  3937. to the Desktop).  A use for this might be to issue a RXSET SIZE command to 
  3938. resize any LISTBOX height, or TEXT or DROPBOX width in accordance with the size 
  3939. of the window.  Here's an example of detecting that a window has been resized, 
  3940. and parsing the new width and height. 
  3941.  
  3942. /* Creates a window called "Text" containing 1 TEXT Group with 1 line of 
  3943. centered text */ 
  3944.  
  3945. RXTYPE.1 = 'TEXT' 
  3946.  
  3947. /* Center the text */ 
  3948. RXFLAGS.1 = 'CENTER' 
  3949.  
  3950. /* Text lines */ 
  3951. RXLABEL.1 = 'Hello' 
  3952.  
  3953. /* TotalPhrases, PhrasesPerLine, WidthOfPhrase, BetweenPhrases */ 
  3954. RXINFO.1 = '1 1' 
  3955.  
  3956. /* Position */ 
  3957. RXX.1 = 10 
  3958. RXY.1 = 10 
  3959.  
  3960. RXDIM = ' ' 
  3961. RXDLG 1 '"Text"' 'RXDIM' 'SIZE|NEWSIZE' 
  3962.  
  3963. /* Do user interaction */ 
  3964. RXDLG 
  3965.  
  3966. /* Is this a resize? */ 
  3967. IF RXID = -14 THEN DO 
  3968.  
  3969.   /* We only have 1 window, but if we had several open, we'd need to check 
  3970. which one was resized so that we'd know which one's Dimensions string to parse 
  3971. */ 
  3972.   IF RXWIND = 'Text' THEN DO 
  3973.    PARSE VAR RXDIM width height x y 
  3974.    /* Now width, height, x, and y hold the window dimensions */ 
  3975.   END 
  3976. END 
  3977.  
  3978.  
  3979. ΓòÉΓòÉΓòÉ 13. Aborting a script ΓòÉΓòÉΓòÉ
  3980.  
  3981. If a script is going to be launched by an app other than RX.EXE (the app must 
  3982. be written to specifically use RXDLG.DLL), then upon return from an RXDLG 
  3983. Operation 0 or 1, you should check if RXID = -99, and immediately EXIT if so. 
  3984. This is the app's way of indicating that it would like your script to 
  3985. prematurely abort. 
  3986.  
  3987.  
  3988. ΓòÉΓòÉΓòÉ 14. Errors ΓòÉΓòÉΓòÉ
  3989.  
  3990. All Rexx Dialog commands return either a string or number (depending upon which 
  3991. you specify via RXERR, but some commands always return strings).  The return is 
  3992. stored in the special REXX symbol RC.  As each command is issued, RC reflects 
  3993. what that command returns.  The return usually tells you whether a command 
  3994. worked or failed (although sometimes the return provides other info instead 
  3995. such as which button was used to dismiss a RXSAY box).  An RC of 0 (for error 
  3996. numbers) or an empty string, ie "" (for error strings) is considered to be a 
  3997. successful return.  In the case of a command that could fail as a result of 
  3998. something that goes wrong within the command, you should always check RC after 
  3999. issuing that command.  Alternately, since all Rexx Dialog commands set the REXX 
  4000. FAILURE or ERROR flags for any possible errors, you can SIGNAL ON ERROR or 
  4001. SIGNAL ON FAILURE to an appropriate place in your REXX script to handle such an 
  4002. error situation. 
  4003.  
  4004. Some Rexx Dialog commands always work if they make it past the REXX interpreter 
  4005. to RX.EXE.  But of course, any command can fail as a result of some syntax 
  4006. error (ie, you typed it in incorrectly) or other errors that occur before the 
  4007. REXX interpreter ships the command off to RX.EXE.  In this case, the ERROR or 
  4008. FAILURE flag is usually raised by the REXX interpreter itself, and it will 
  4009. return an RC value (usually a number that is not 0, instead of an empty 
  4010. string).  Or, the interpreter may abort the script and return an error number 
  4011. to RX.EXE.  In the case of these errors, RX.EXE displays a PM message box 
  4012. containing the error.  The heading of the dialog will be "REXX INTERPRETER 
  4013. ERROR".  (When you use RXSAY, the PM message box default heading is "Rexx 
  4014. Dialog x.x" where x.x is the version and revision number of the Rexx Dialog 
  4015. release).  The error message provided by the interpreter usually identifies the 
  4016. line number in your script where the error occurred, and may also display the 
  4017. text upon that line. 
  4018.  
  4019. Note:  The interpreter doesn't count blank lines, or lines that only contain 
  4020.        comments.  So when it reports that an error occurred upon line 5, that 
  4021.        doesn't mean that it actually is line 5 in your text file.  You need to 
  4022.        count the lines, skipping any blank lines or lines that contain only 
  4023.        comments in order to find the "real" line 5.
  4024.  
  4025. If REXX aborts the script (ie, perhaps REXX detected an error with it before 
  4026. even starting the script running), then RX.EXE will display an error message in 
  4027. a PM message box.  Once again, the message box will have a heading that says 
  4028. "REXX INTERPRETER ERROR:".  If the problem was with RX.EXE being unable to set 
  4029. itself up or find the script that you specified to run, then the message box 
  4030. heading will be "Rexx Dialog x.x".  The 2 different headings allow you to 
  4031. visually differentiate between errors with the REXX interpreter (ie, usually 
  4032. with the standard REXX commands, or syntax problems, etc), and errors with 
  4033. processing the 9 special Rexx Dialog commands (errors that occur in creating 
  4034. and managing the PM interface).  For the meaning of REXX INTERPRETER ERROR 
  4035. messages, consult your REXX documentation. 
  4036.  
  4037. When developing a script, it may be advantageous to include this line at the 
  4038. top: 
  4039.  
  4040. RXERR 'FULL' 
  4041.  
  4042. This will force the REXX interpreter to supply the line number and REXX source 
  4043. where the error occurred. 
  4044.  
  4045. Here are the error messages (and corresponding error numbers) that each Rexx 
  4046. Dialog command may return.  The bottom two (highlighted) digits of the error 
  4047. number indicate the "display level" for that message (to be used as a reference 
  4048. when you set the display level with RXERR). 
  4049.  
  4050. RXDLG 
  4051.  
  4052. When you use the first template of RXDLG, it could return any of the following 
  4053. errors: 
  4054.  
  4055. 211       "Can't create dialog." 
  4056.  
  4057.           Rexx Dialog couldn't create the window (into which all of the Groups 
  4058.           of controls are placed).  Possible problems are: you have too many 
  4059.           windows open and OS/2 has run out of certain PM resources, or you may 
  4060.           have specified a window size that is too big for the display or X and 
  4061.           Y positions that cause problems (ie, try setting the windows 
  4062.           Dimensions string to a null string for default size and position). 
  4063.  
  4064. 212       "Can't create control: Group XXX, Control XXX." 
  4065.  
  4066.           Rexx Dialog couldn't create a particular control within a Group.  The 
  4067.           XXX after "Group" will indicate which Group number the control 
  4068.           belonged to.  For example, if the control was in the first Group that 
  4069.           you defined for the window, then XXX would be 1.  The XXX after 
  4070.           "Control" will indicate which control within the group couldn't be 
  4071.           created.  For example, if the control was in the first in the group, 
  4072.           then XXX would be 1.  Possible problems are: you have too many 
  4073.           windows/controls open and OS/2 has run out of certain PM resources, 
  4074.           or you specified some incorrect width for the control, or you 
  4075.           specified some strange X and Y position for the group, or made some 
  4076.           other error in the setup of REXX variables particularly for that one 
  4077.           control within the Group. 
  4078.  
  4079. 213       "Bad Group Type: Group XXX, Control 1.." 
  4080.  
  4081.           An unknown Group Type was encountered.  The XXX after "Group" will 
  4082.           indicate which Group number had an unknown Type.  For example, if the 
  4083.           first Group that you defined for the window had a bad Type, then XXX 
  4084.           would be 1.  Possible problems are: you specified some incorrect Type 
  4085.           for this Group (ie, check its RXTYPE variable), or you're using an 
  4086.           old version of RXDLG.DLL that doesn't support this Group Type (ie, 
  4087.           use the RXVERS command to discover whether the DLL's version and 
  4088.           revision is equal or greater than the version/revision in the title 
  4089.           of this book). 
  4090.  
  4091. 214       "Can't create control Label: Group XXX, Control XXX." 
  4092.  
  4093.           Rexx Dialog couldn't create a label for a particular control within a 
  4094.           Group.  The XXX after "Group" will indicate which Group number the 
  4095.           control belonged to.  For example, if the control was in the first 
  4096.           group that you defined for the window, then XXX would be 1.  The XXX 
  4097.           after "Control" will indicate for which control within the Group the 
  4098.           label couldn't be created.  For example, if the control was the first 
  4099.           in the Group, then XXX would be 1.  Possible problems are: you have 
  4100.           too many windows/controls open and OS/2 has run out of certain PM 
  4101.           resources, or you specified some strange X position for the Group 
  4102.           which maybe didn't leave room for a label to the left of the control, 
  4103.           or you didn't properly specify the label for the control (ie, check 
  4104.           the RXLABEL string for the Group to make sure that you have enough 
  4105.           labels for all controls). 
  4106.  
  4107. 215       "Can't create Groupbox: Group XXX, Control XXX." 
  4108.  
  4109.           Rexx Dialog couldn't create a particular Groupbox around a Group (or 
  4110.           if the Type for a group is GROUP, then it couldn't create that 
  4111.           Groupbox).  The XXX after "Group" will indicate the Group number for 
  4112.           which the Groupbox couldn't be created.  For example, if the Groupbox 
  4113.           was to encircle the first group that you defined for the window, then 
  4114.           XXX would be 1.  Possible problems are: you have too many 
  4115.           windows/controls open and OS/2 has run out of certain PM resources, 
  4116.           or you specified some incorrect width for the control, or you 
  4117.           specified some strange X and Y position for the group, or you didn't 
  4118.           properly specify the label for the Groupbox (ie, check the RXLABEL 
  4119.           string for the Group to make sure that you have enough labels for all 
  4120.           controls as well as the Groupbox).  If the indicated "Control" number 
  4121.           is not equal to the TotalControls parameter in the Group's RXLABEL 
  4122.           string (with the exception of RESULT Group, or button Groups where 
  4123.           there are "skipped" buttons), then this indicates a potential problem 
  4124.           with not enough or too many labels in the RXLABEL string. 
  4125.  
  4126. ???       "Failed to create/set REXX variable XXX." 
  4127.  
  4128.           Rexx Dialog couldn't setup some REXX return variable (for example, 
  4129.           the RXVAL return for a Group, or RXWIND, etc).  The error number can 
  4130.           be one of several different values depending upon what the REXX 
  4131.           Interpreter returns.  This error indicates an internal problem with 
  4132.           the REXX Interpreter, and could be anything from a memory problem to 
  4133.           what-have-you.  But, when receiving any such error, your script 
  4134.           should assume that RXDLG has not returned a good set of values.  The 
  4135.           XXX tells which REXX variable in particular couldn't be setup. 
  4136.           Although this message is associated with a range of error numbers, 
  4137.           its display level is 16. 
  4138.  
  4139. ???       "Can't fetch REXX variable XXX." 
  4140.  
  4141.           Rexx Dialog couldn't find some REXX variable that your script was 
  4142.           supposed to setup prior to a call to RXDLG.  (for example, the RXTYPE 
  4143.           for a Group, etc).  The error number can be one of several different 
  4144.           values depending upon what the REXX Interpreter returns.  The XXX 
  4145.           tells which REXX variable in particular couldn't be fetched.  Check 
  4146.           to make sure that you have either defined that REXX variable in your 
  4147.           script (ie, sometimes, with copying and pasting source code, it's 
  4148.           easy to forget to change the extension on a stem variable to reflect 
  4149.           the Group number), or that the NumGroups arg to RXDLG reflects how 
  4150.           many Groups you have defined.  This error message cannot be 
  4151.           surpressed, and the REXX Interpreter forces a message box display. 
  4152.  
  4153. 10008     "Not enough memory." 
  4154.  
  4155.           There is not enough free RAM in your system to setup some structures 
  4156.           needed to create window/controls.  You'll have to close down other 
  4157.           running programs. 
  4158.  
  4159. When you use the second template of RXDLG, it could return any of the following 
  4160. errors: 
  4161.  
  4162. 10017     "Can't find REXX dialog." 
  4163.  
  4164.           RXDLG couldn't find the specified window to perform an operation 
  4165.           upon.  Possible problems are: you've passed a WindowTitle arg to 
  4166.           RXDLG that doesn't match any of the open windows (or perhaps omitted 
  4167.           the WindowTitle arg, but included the Operation arg -- you must 
  4168.           supply both, or neither).  If the passed WindowTitle arg is '""' (or 
  4169.           not supplied), then you must have at least a Main Window open.  The 
  4170.           exception to this is an operation of 255, which will never return 
  4171.           this (or any other Rexx Dialog) error. 
  4172.  
  4173. 10007     "Too much device input to return: XXX." 
  4174.  
  4175.           The string to be returned is larger than 256 characters.  You might 
  4176.           try trimming the start or end patterns, or parsing each value into 
  4177.           its own variable. 
  4178.  
  4179. Also, the "Failed to create/set REXX variable XXX" error message\number may be 
  4180. encountered for Operations of 0, 1, 2, 3, and 4 (although it's a trivial 
  4181. problem with Operation 4 -- this just means that the Window's Dimensions string 
  4182. hasn't been updated). 
  4183.  
  4184. RXDEV 
  4185.  
  4186. 10005     "Can't find/setup device: XXX." 
  4187.  
  4188.           RXDEV couldn't find the specified device to perform an operation 
  4189.           upon.  Possible problems are: you've passed a DevTitle arg to RXDEV 
  4190.           that doesn't match any of the open devices (or perhaps omitted the 
  4191.           DevTitle arg, but included the Operation arg -- you must supply both, 
  4192.           or neither).  If the passed DevTitle arg is '""' (or not supplied), 
  4193.           then you must have at least 1 device open.  Also, you must have a 
  4194.           Main Window open in order to open a device, and the device must be 
  4195.           opened for reading using FILEREXX's FileOpen.  XXX will be the device 
  4196.           name passed to RXDEV. 
  4197.  
  4198. 10006     "Can't start REXX device thread." 
  4199.  
  4200.           Can't start a thread to read data from the device.  Try closing down 
  4201.           other OS/2 apps. 
  4202.  
  4203. 10020     "XXX Operation not supported." 
  4204.  
  4205.           The operation that you specified is not recognized by this version of 
  4206.           Rexx Dialog.  XXX will be the operation that Rexx Dialog doesn't 
  4207.           understand.  Make sure that you spelled it correctly, and have a 
  4208.           current version of RXDLG.DLL.  Also, you will see this error if you 
  4209.           forget to do an OPEN Operation on the specified DevName before 
  4210.           attempting to do some other operation. 
  4211.  
  4212. 10009     "Bad read NNN, Device: XXX." 
  4213.  
  4214.           There was an error reading the next byte from a device.  XXX will be 
  4215.           the device name (as you specified during the OPEN Operation).  This 
  4216.           error may happen when accessing a device that returns immediately 
  4217.           when it has no bytes to return to Rexx Dialog (ie, it doesn't "block" 
  4218.           reads).  In this case, you'll have to find some way of querying the 
  4219.           device to determine if it has any input bytes queued (ie, usually via 
  4220.           some IOCTL vector that you'll access using FILEREXX), and read only 
  4221.           that many bytes (using FILEREXX's reading functions).  This error may 
  4222.           also happen if CTRL-C or CTRL-BREAK is pressed, or some other 
  4223.           operation causes the device to abort a read (if the device supports 
  4224.           that).  NNN is the error number returned from OS/2, and can be: 
  4225.  
  4226.           5     Access denied 
  4227.           6     Invalid handle 
  4228.           26     Not a DOS disk 
  4229.           33     Lock violation 
  4230.           109    Broken pipe connection 
  4231.           234    More data 
  4232.           -1     Can't get a semaphore for the device thread.  Try closing down 
  4233.           other OS/2 apps. 
  4234.  
  4235. RXFILE 
  4236.  
  4237. 311       "Can't create dialog." 
  4238.  
  4239.           Rexx Dialog couldn't open the File Dialog.  Possible problems are: 
  4240.           you have too many windows open and OS/2 has run out of certain PM 
  4241.           resources, or you may have specified a bizarre filename (ie, try 
  4242.           setting to a null string). 
  4243.  
  4244. The "Failed to create/set REXX variable XXX" error message\number may be 
  4245. returned if Rexx Dialog couldn't return the filename. 
  4246.  
  4247. The "Can't fetch REXX variable XXX" error message\number may be returned if 
  4248. Rexx Dialog couldn't fetch the initial filename.  Make sure that you initialize 
  4249. the FilenameVar arg to RXFILE, even if you set it to a null string. 
  4250.  
  4251. RXHELP 
  4252.  
  4253. 10022     "Can't attach help file." 
  4254.  
  4255.           Rexx Dialog couldn't attach the help file to the window.  Possible 
  4256.           problems are: OS/2 has run out of certain PM resources, or you didn't 
  4257.           properly specify the help filename (ie, make sure that you spelled it 
  4258.           correctly, and supplied a complete path if that is needed). 
  4259.  
  4260. 10021     "Can't find help panel XXX." 
  4261.  
  4262.           Rexx Dialog couldn't find the specified panel number or name within 
  4263.           the help file for the window.  Possible problems are: OS/2 has run 
  4264.           out of certain PM resources, or you didn't properly specify the panel 
  4265.           name or number (ie, make sure that you spelled it correctly), or no 
  4266.           such panel name or number exists within the help file that is 
  4267.           attached to the Window specified to RXHELP (ie, make sure that you 
  4268.           have the correct window and help file). 
  4269.  
  4270. The "Can't find REXX dialog." error message\number may be returned if the 
  4271. WindowTitle you specified doesn't match any open window. 
  4272.  
  4273. RXSAY 
  4274.  
  4275. RXSAY never causes a REXX FAILURE or ERROR, but always returns a number 
  4276. (regardless of RXERR's NUM flag) as described in RXSAY. 
  4277.  
  4278. RXSET 
  4279.  
  4280. 10018     "Can't find group XXX" 
  4281.  
  4282.           The window that you specified doesn't contain the GroupNum that you 
  4283.           specified.  Make sure that you haven't asked for a Group number 
  4284.           larger than the number of Groups in the window, nor a Group number of 
  4285.           0. 
  4286.  
  4287. 10019     "Can't find control XXX" 
  4288.  
  4289.           The Group that you specified doesn't contain the control that you 
  4290.           specified.  Make sure that you haven't asked for a control number 
  4291.           larger than the number of controls in the Group, nor a control number 
  4292.           of 0. 
  4293.  
  4294. 10010     "Can't start timer." 
  4295.  
  4296.           If you do a TIME operation to setup a timer for a window, and the 
  4297.           timer can't be setup, this error may be returned.  OS/2 has a limited 
  4298.           number of timers available, so shut down other apps that may be using 
  4299.           timers. 
  4300.  
  4301. The "Operation not supported." error message\number may be returned if the 
  4302. operation that you specified is not recognized by this version of Rexx Dialog. 
  4303.  
  4304. The "Can't find REXX dialog." error message\number may be returned if the 
  4305. WindowTitle you specified doesn't match any open window. 
  4306.  
  4307. RXVERS 
  4308.  
  4309. RXVERS never causes a REXX FAILURE or ERROR, but always returns a string 
  4310. (regardless of RXERR's NUM flag) as described in RXVERS. 
  4311.  
  4312. Other Rexx Dialog commands 
  4313.  
  4314. All other Rexx dialog commands do not return anything except successful returns 
  4315. (ie, 0 error numbers, or null strings). 
  4316.  
  4317. There are a few error messages that you may see that aren't related to specific 
  4318. Rexx Dialog commands.  Unless otherwise mentioned, these will happen before 
  4319. your script starts executing, and usually reflect a problem in RX.EXE's setup. 
  4320. These error messages are always displayed unless otherwise mentioned. 
  4321.  
  4322. 20001     "Can't find REXX script to run." 
  4323.  
  4324.           The script name that you specified for RX.EXE to run can't be found. 
  4325.           Check that you spelled the script name correctly and/or supplied the 
  4326.           correct path.  If you didn't supply a path, then the script must be 
  4327.           in the same directory as RX.EXE, or must be in the directory 
  4328.           specified in the Working Directory or specified in the Parameters 
  4329.           field of the Program Object for the script (if launched from a 
  4330.           Desktop object). 
  4331.  
  4332. 20003     "Window registration failed." 
  4333.  
  4334.           RXDLG.DLL couldn't properly register its special window class. 
  4335.           Perhaps there is another running app that happens to have a 
  4336.           similiarly named public window class.  (Unlikely, but try closing 
  4337.           down other running apps). 
  4338.  
  4339. 20004     "Can't install REXX." 
  4340.  
  4341.           RXDLG.DLL couldn't properly register its REXX handler.  Perhaps there 
  4342.           is another running app that happens to have a similiarly named 
  4343.           handler.  (Unlikely, but try closing down other running apps). 
  4344.  
  4345. 10002     "REXX dialog unknown command: XXX" 
  4346.  
  4347.           This error may occur while your script is running.  It indicates that 
  4348.           your script contains a command that isn't some built-in REXX command, 
  4349.           but also isn't a Rexx Dialog command.  It may be that you're trying 
  4350.           to run some executable, for example, OS/2's COPY command.  See the 
  4351.           discussion in Launching programs. 
  4352.  
  4353.           This error message has a display level of 2. 
  4354.