home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rexx / rexxtr / vprxx / vprxx.hlp (.txt) < prev   
OS/2 Help File  |  1994-02-02  |  48KB  |  1,714 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. RxExtras Object Help ΓòÉΓòÉΓòÉ
  3.  
  4. This control is used for programming. 
  5.  
  6. It is used by the programmer to access RxExtras functions. For more info on 
  7. what functions are provided, see the 'Create Link' dialog for any RxExtras 
  8. object. 
  9.  
  10.  
  11. ΓòÉΓòÉΓòÉ 2. Style Page Help ΓòÉΓòÉΓòÉ
  12.  
  13. There are really no styles - just the basic. 
  14.  
  15. We recommend that you keep the object invisible and delete it from your form 
  16. before building. This way there is no run-time requirement, except for the 
  17. RxExtras DLL. 
  18.  
  19.  
  20. ΓòÉΓòÉΓòÉ 3. Read a file into a stemmed variable ΓòÉΓòÉΓòÉ
  21.  
  22. ΓöÇΓöÇΓöÇRXREAD(ΓöÇΓöÇ'stemname.'ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  23.                             ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
  24.                                            ΓööΓöÇpath\ΓöÇΓöÿ
  25.  
  26.  
  27. Reads filename into the stem variable stemname..  The trailing period to 
  28. stemname. is required; results are unpredictable if it is not supplied.  RXREAD 
  29. assumes that the contents of filename are ASCII text, with each line terminated 
  30. by a CR/LF. 
  31.  
  32. RXREAD always returns NULL if successful, and the count of lines retrieved is 
  33. placed in stemname.0.  Each unique line of text is place in stemname.n and may 
  34. be displayed in a loop or by other means. If filename cannot be read, RXREAD 
  35. raises an 'Incorrect call to routine' condition. 
  36.  
  37. Example: 
  38.  
  39.      Call RxRead 'textlines.','C:\Config.Sys'
  40.      Do Count = 1 to textlines.0
  41.         Say textlines.Count
  42.      End
  43.  
  44. Output: 
  45.  
  46.      PROTSHELL=C:\OS2\PMSHELL.EXE          /* perhaps */
  47.      SET USER_INI=C:\OS2\OS2.INI           /* perhaps */
  48.      . . .
  49.  
  50.  
  51. ΓòÉΓòÉΓòÉ 4. Write a stemmed variable to a file ΓòÉΓòÉΓòÉ
  52.  
  53. ΓöÇΓöÇΓöÇRXWRITE(ΓöÇΓöÇ'stemname.'ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  54.                              ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
  55.                                             ΓööΓöÇpath\ΓöÇΓöÿ
  56.  
  57.  
  58. Writes filename from the stem variable stemname..  The trailing period to 
  59. stemname. is required; results are unpredictable if it is not supplied. 
  60. RXWRITE requires that the number of lines to write are designated in 
  61. stemname.0.  It also requires that the lines of text are placed in stemname. 
  62. such that entries are numeric in nature, starting at 1 and continuing up to the 
  63. number defined in stemname..0.  stemname. variables that are not numeric or are 
  64. not within the range 1 to stemname.0 will not be written to filename.  RXWRITE 
  65. writes the text lines in ascending numerical order. 
  66.  
  67. RXWRITE always overlays the contents of a previously-existing file, otherwise 
  68. it creates the file as required. 
  69.  
  70. RXWRITE always returns NULL if successful.  If filename cannot be written, it 
  71. raises an 'Incorrect call to routine' condition. 
  72.  
  73. Example: 
  74.  
  75.      MyStem.0 = 4
  76.      MyStem.4 = 'We''re as happy as can be.'
  77.      MyStem.2 = 'Hi There!'
  78.      MyStem.3 = 'Ho There!'
  79.      MyStem.1 = 'Hey There!'
  80.      Call RxWrite 'MyStem.','C:\Temp.Out'
  81.  
  82. Contents of C:\Temp.Out: 
  83.  
  84.      Hey There!
  85.      Hi There!
  86.      Ho There!
  87.      We're as happy as can be.
  88.  
  89.  
  90. ΓòÉΓòÉΓòÉ 5. Get drive OS/2 was booted from ΓòÉΓòÉΓòÉ
  91.  
  92. ΓöÇΓöÇΓöÇRXBOOTDRIVE()ΓöÇΓöÇΓöÇ
  93.  
  94.  
  95. Returns the drive from which OS2 was booted in the format 'X'. 
  96.  
  97. If you want a trailing ':' you must append one to the returned drive letter. 
  98.  
  99. Example: 
  100.  
  101.      SAY 'My Boot Drive is' RxBootDrive() || ':'
  102.  
  103. Output: 
  104.  
  105.      My Boot Drive is C:           /* perhaps */
  106.  
  107.  
  108. ΓòÉΓòÉΓòÉ 6. Get the volume label of a drive ΓòÉΓòÉΓòÉ
  109.  
  110. ΓöÇΓöÇΓöÇRXVOLUMELABEL(drive)ΓöÇΓöÇΓöÇ
  111.  
  112.  
  113. Returns the volume label for disc drive drive.  If no label exists, it returns 
  114. 'NO LABEL'. 
  115.  
  116. Returns 'Error Querying drive label' for an invalid drive letter. 
  117.  
  118. You may append an optional colon to the letter, but only the drive letter 
  119. itself is required. 
  120.  
  121. Example: 
  122.  
  123.      SAY 'Volume Label of drive C is' RxVolumeLabel('C')
  124.  
  125. Output: 
  126.  
  127.      Volume Label of drive C is MY DRIVE C       /* perhaps */
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 7. Get a list of all local variables ΓòÉΓòÉΓòÉ
  131.  
  132. ΓöÇΓöÇΓöÇRXVARDUMP(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  133.  
  134.  
  135. Copies all local variables to stemname for debugging.  The trailing period is 
  136. required; results are unpredictable without it. 
  137.  
  138. RXVARDUMP always returns NULL.  The count of variables retrieved is placed in 
  139. stemname.0.  Each unique variable is placed in a pair of variables, 
  140. stemname.n.name and stemname.n.value and may be displayed in a loop or by other 
  141. means. 
  142.  
  143. Example: 
  144.  
  145.      XYZ = '123'
  146.      MyVar = 'Quick Brown Fox'
  147.      Call RxVarDump 'varlist.'
  148.      Do Count = 1 to varlist.0
  149.         Say varlist.Count.name 'has the value "'varlist.Count.value'"'
  150.      End
  151.  
  152. Output: 
  153.  
  154.      XYZ has the value "123"
  155.      MYVAR has the value "Quick Brown Fox"
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 8. Copy a stemmed variable. ΓòÉΓòÉΓòÉ
  159.  
  160. ΓöÇΓöÇΓöÇRXSTEMCOPY(ΓöÇΓöÇ'sourcestem.'ΓöÇΓöÇ,ΓöÇΓöÇ'targetstem.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  161.  
  162.  
  163. Copies the entire contents of sourcestem. to targetstem..  The trailing period 
  164. to sourcestem. and targetstem. are required; results are unpredictable if they 
  165. are not supplied. 
  166.  
  167. RXSTEMCOPY always returns NULL. 
  168.  
  169. Example: 
  170.  
  171.      Source.ABC = 'ABCDEFG'
  172.      Source.123 = '123456789'
  173.      Call RxStemCopy 'Source.','Target.'
  174.      Say Target.ABC
  175.      Say Target.123
  176.  
  177. Output: 
  178.  
  179.      ABCDEFG
  180.      123456789
  181.  
  182.  
  183. ΓòÉΓòÉΓòÉ 9. Initialise or Uninitialise RxExtras ΓòÉΓòÉΓòÉ
  184.  
  185. ΓöÇΓöÇΓöÇRXEXTRA(ΓöÇΓö¼ΓöÇ'LOAD'ΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇ
  186.               ΓööΓöÇ'DROP'ΓöÇΓöÿ
  187.  
  188.  
  189. Loads or Drops all functions in this package. 
  190.  
  191. Returns the version number of RxExtras after loading or dropping. 
  192.  
  193. Example: 
  194.  
  195.      rcy = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
  196.      Say 'Using version 'RxExtra("Load")' of RxExtras'
  197.  
  198. Output: 
  199.  
  200.      Using version 1.8 of RxExtras        /* perhaps */
  201.  
  202.  
  203. ΓòÉΓòÉΓòÉ 10. Sorting a stemmed variable ΓòÉΓòÉΓòÉ
  204.  
  205. ΓöÇΓöÇΓöÇRXSORT(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ[,ΓöÇ'Ascending'ΓöÇ]ΓöÇΓö¼[,ΓöÇstartΓöÇ, ΓöÇendΓöÇ]ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  206.                              ΓööΓöÇ'Descending'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  207.  
  208.  
  209. Sorts a stemmed variable stemname. in either Ascending or Descending ASCII 
  210. sequence.  Only the A or D of the sort order is required. 
  211.  
  212. The number of items to sort must be placed in stemname.0.  All values to sort 
  213. must be in stemname.1 through stemname.n, where n is the number placed in 
  214. stemname.0. 
  215.  
  216. RXSORT always returns NULL if invoked properly. 
  217.  
  218. Example: 
  219.  
  220.      Stem.0 = 3
  221.      Stem.1 = 'Now is the time...'
  222.      Stem.2 = 'A stitch in time...'
  223.      Stem.3 = 'Somewhere in time...'
  224.      Call RxSort 'Stem.','A'
  225.      Do Count = 1 to Stem.0
  226.         Say Stem.Count
  227.      End
  228.      Say '-----------------'
  229.      Call RxSort 'Stem.','D'
  230.      Do Count = 1 to Stem.0
  231.         Say Stem.Count
  232.      End
  233.  
  234. Output: 
  235.  
  236.      A stitch in time...
  237.      Now is the time...
  238.      Somewhere in time...
  239.      -----------------
  240.      Somewhere in time...
  241.      Now is the time...
  242.      A stitch in time...
  243.  
  244.  
  245. ΓòÉΓòÉΓòÉ 11. Switch to a running application ΓòÉΓòÉΓòÉ
  246.  
  247. ΓöÇΓöÇΓöÇRXSWITCHTO(ΓöÇΓöÇ'session'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  248.  
  249.  
  250. Switches the forground session to the the session named by session. 
  251.  
  252. RXSWITCHTO will attempt to locate a session, by name, that matches in any part 
  253. of its name to the contiguous characters defined by session  For example, if 
  254. session contains 'stem C', RXSWITCHTO will switch to the System Clock session, 
  255. if it is active.  If you desire to specifiy a complete name, use 
  256. RxQuerySwitchList to obtain the full names of all executing sessions. 
  257.  
  258. RXSWITCHTO returns 'Switch Entry not found' if it cannot find a session name to 
  259. match session. 
  260.  
  261. Example: 
  262.  
  263.      Call RxSwitchTo '2.0'       /* try "OS/2 2.0 Desktop" */
  264.      If  Result \= '' Then       /* probably 2.1 */
  265.           Call RxSwitchTo 'Desktop'
  266.  
  267. Results: 
  268.  
  269.      The system switches to your OS/2 desktop, making it the active
  270.      forground session.  Your REXX program continues to execute in
  271.      the background.
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 12. Get a list of running applications ΓòÉΓòÉΓòÉ
  275.  
  276. ΓöÇΓöÇΓöÇRXQUERYSWITCHLIST(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  277.  
  278.  
  279. Retrieves a list of executing sessions into the stemmed variable stemname.. 
  280.  
  281. The count of executing sessions, plus 1, is placed in stemname.0, and the title 
  282. of each session is placed in stemname.2 through stemname.n, where n is the 
  283. value found in stemname.0. stemname.1 will contain 'Switch to'.  Note that 
  284. RXQUERYSWITCHLIST will list "hidden" sessions. 
  285.  
  286. RXQUERYSWITCHLIST always returns NULL. 
  287.  
  288. stemname.n.HWND holds the nth entry's window handle. 
  289.  
  290. stemname.n.PID holds the nth entry's process id. 
  291.  
  292. Example: 
  293.  
  294.      Call RxQuerySwitchList 'temp.'
  295.      Do Count = 2 to temp.0
  296.           Say temp.Count
  297.      End
  298.  
  299. Output: 
  300.  
  301.      4OS2 Window                   /* perhaps */
  302.      Tritus SPF                    /* perhaps */
  303.      System Clock                  /* perhaps */
  304.      Pulse                         /* perhaps */
  305.      Desktop                       /* perhaps */
  306.  
  307.  
  308. ΓòÉΓòÉΓòÉ 13. Load a listbox or combobox from a file ΓòÉΓòÉΓòÉ
  309.  
  310. ΓöÇΓöÇΓöÇRXLISTBOXFROMFILE(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  311.                                    ΓööΓöÇlbidΓöÇΓöÿ
  312.  
  313. Places the contents of file filename into ListBox lbid of Window window. 
  314.  
  315. If lbid is omitted, window is assumed to be the PM handle of a list box. 
  316.  
  317. If window and/or filename are invalid/inaccessible, RXLISTBOXFROMFILE raises an 
  318. INCORRECT CALL TO ROUTINE condition from within REXX. Otherwise, 
  319. RXLISTBOXFROMFILE returns a null string. 
  320.  
  321. Note:  This API appends to the end of any existing contents already in ListBox 
  322. lbid. 
  323.  
  324. Example: 
  325.  
  326.      Call RxListBoxFromFile window, 1000, 'C:\Config.Sys'
  327.  
  328. Results: 
  329.  
  330.      The contents of C:\Config.Sys are placed into ListBox 1000 of
  331.      window window.
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 14. Get the file system of a drive ΓòÉΓòÉΓòÉ
  335.  
  336. ΓöÇΓöÇΓöÇRXQUERYDRIVETYPE(drive:)ΓöÇΓöÇΓöÇ
  337.  
  338.  
  339. Returns 'HPFS', 'FAT' or 'CDFS' for their respective drive types. 
  340.  
  341. Returns 'NOTREADY' for the following conditions: 
  342.  
  343.      o A CD-ROM drive with an Audio CD loaded. 
  344.      o An empty floppy drive. 
  345.      o An invalid drive letter. 
  346.  
  347.  Example: 
  348.  
  349.        SAY 'Drive C: is a' RxQueryDriveType('C:') 'drive.'
  350.  
  351.  Output: 
  352.  
  353.        Drive C: is a HPFS drive.           /* perhaps */
  354.  
  355.  
  356. ΓòÉΓòÉΓòÉ 15. Locate a file in a list of directories ΓòÉΓòÉΓòÉ
  357.  
  358. ΓöÇΓöÇΓöÇRXSEARCHPATH(ΓöÇΓöÇsearchpathΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇ)ΓöÇΓöÇΓöÇ
  359.                                 ΓööΓöÇsubdir\ΓöÇΓöÿ
  360.  
  361.  
  362. Searches for [ subdir\ ]filename in the path(s) defined by searchpath. 
  363.  
  364. The path(s) defined for searchpath will be used for the search.  searchpath may 
  365. be composed of several pathnames, each separated by a semicolon.  Each pathname 
  366. is allowed to have either a drive designator, a directory designator, or both. 
  367.  
  368. Currently, filename must specify a complete filename; no wildcard characters 
  369. are accepted.  If you supply the optional subdir\ qualifier, the effect is as 
  370. if you had modified all the values of searchparh to include the addtional 
  371. subdir\ value.  For example, if searchpath contains 'F:\OS2;G:\USER', and you 
  372. specify 'DLL\' for subdir,, the effect is the same as having specified 
  373. 'F:\OS2\DLL;G:\USER\DLL' for searchpath and no value for subdir\. 
  374.  
  375.  RXSEARCHPATH returns a fully qualified filename if it finds one, otherwise it 
  376. returns NULL. 
  377.  
  378. Example: 
  379.  
  380.      /*  Find COUNTRY.SYS */
  381.      SchPath = 'C:\OS2\SYSTEM;D:\OS2\SYSTEM;E:\OS2\SYSTEM'
  382.      SAY RxSearchPath(SchPath,'COUNTRY.SYS')
  383.  
  384. Output: 
  385.  
  386.      D:\OS2\SYSTEM\COUNTRY.SYS    /* if found in D:\OS2\SYSTEM */
  387.  
  388.  
  389. ΓòÉΓòÉΓòÉ 16. Get selected item from listbox or combobox ΓòÉΓòÉΓòÉ
  390.  
  391. ΓöÇΓöÇΓöÇRXGETITEMFROMLISTBOX(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  392.  
  393.  
  394. Retrieves the first selected item from ListBox lbid of Window winid. 
  395.  
  396. If either winid or lbid are invalid, the REXX error condition INCORRECT CALL TO 
  397. ROUTINE is raised. 
  398.  
  399. If no items are selected, RXGETITEMFROMLISTBOX returns an empty string ("").
  400.  
  401. If winid and/or lbid are invalid, RXGETITEMFROMLISTBOX raises an INCORRECT CALL 
  402. TO ROUTINE error from within REXX. Otherwise, RXGETITEMFROMLISTBOX returns the 
  403. selected item. 
  404.  
  405. Note:  The VisPro/Rexx API VpGetItemValue will only return up to 262 characters 
  406. for the retrieved item.  RxGetItemFromListBox will exactly what is in the 
  407. listbox. 
  408.  
  409. Example: 
  410.  
  411.      row = RxGetItemFromListBox(window, 1000)
  412.  
  413. Results: 
  414.  
  415.      The first selected item in ListBox 1000 of window window is
  416.      retrieved and placed in the variable row.
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 17. Set spinbutton range with increment ΓòÉΓòÉΓòÉ
  420.  
  421. ΓöÇΓöÇΓöÇRXSETSPINBUTTONRANGEWITHINCREMENT(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇsbidΓöÇΓöÇ,ΓöÇΓöÇlowΓöÇΓöÇ,ΓöÇΓöÇhighΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇ
  422.  
  423.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇincrementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ)ΓöÇΓöÇ
  424.  
  425.  
  426. Sets the SpinButton sbid of Window window to the numeric range of low to high, 
  427. in increments of increment. 
  428.  
  429. If window and/or sbid are invalid, RXSETSPINBUTTONRANGEWITHINCREMENT raises the 
  430. REXX error condition INCORRECT CALL TO ROUTINE. Otherwise, 
  431. RXSETSPINBUTTONRANGEWITHINCREMENT returns an empty string (""). 
  432.  
  433. Example: 
  434.  
  435.      Call RxSetSpinButtonRangeWithIncrement window, 4000, 0, 10000, 2000
  436.  
  437. Results: 
  438.  
  439.      The SpinButton with ID=4000 in window window now contains the
  440.      selection numeric set 0, 2000, 4000, 6000, 8000, and 10000.
  441.  
  442. Note:  The maximum number of discrete values that this function can store in a 
  443. spin button is 4096. 
  444.  
  445.  
  446. ΓòÉΓòÉΓòÉ 18. Set spinbutton character range ΓòÉΓòÉΓòÉ
  447.  
  448. ΓöÇΓöÇΓöÇRXSETSPINBUTTONCHARRANGE(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇsbidΓöÇΓöÇ,ΓöÇΓöÇlowΓöÇΓöÇ,ΓöÇΓöÇhighΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  449.  
  450.  
  451. Sets the SpinButton sbid of Window winid to include the ASCII character range 
  452. low through high. Only the first character of low and high are used. 
  453.  
  454. If winid and/or sbid are invalid, RXSETSPINBUTTONCHARRANGE raises the REXX 
  455. error condition INCORRECT CALL TO ROUTINE. Otherwise, RXSETSPINBUTTONCHARRANGE 
  456. returns an empty string (""). 
  457.  
  458. Example: 
  459.  
  460.      Call RxSetSpinButtonCharRange Hwindow, 4000, 'a', 'z'
  461.  
  462. Results: 
  463.  
  464.      The SpinButton with ID=4000 in window Hwindow now contains the
  465.      selection character set 'a' through 'z', inclusive.
  466.  
  467.  
  468. ΓòÉΓòÉΓòÉ 19. Get item value at index from listbox or combobox ΓòÉΓòÉΓòÉ
  469.  
  470. ΓöÇΓöÇΓöÇRXGETITEMFROMLISTBOXATINDEX(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓöÇrowΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  471.  
  472.  
  473. Retrieves the line row from ListBox lbid of Window window. 
  474.  
  475. If no item exists at line row in window and/or lbid are invalid, 
  476. RXGETITEMFROMLISTBOXATINDEX raises an INCORRECT CALL TO ROUTINE error from 
  477. within REXX. 
  478.  
  479. Otherwise, RXGETITEMFROMLISTBOXATINDEX returns the item of choice. 
  480.  
  481. Note:  The VisPro/Rexx API VpGetItemValueAtIndex will only return up to 256 
  482. characters for the retrieved item.  RxGetItemFromListBoxAtIndex will return 
  483. whatever is in the listbox, with no limitations. 
  484.  
  485. Example: 
  486.  
  487.      row = RxGetItemFromListBoxAtIndex(window, 1000, 4)
  488.  
  489. Results: 
  490.  
  491.      If it exists, the item at line 4 in ListBox 1000 of window window
  492.      is retrieved and placed in the variable row.
  493.  
  494.  
  495. ΓòÉΓòÉΓòÉ 20. Set System wide global variable ΓòÉΓòÉΓòÉ
  496.  
  497. ΓöÇΓöÇΓöÇRXSETGLOBAL(ΓöÇΓöÇvarnameΓöÇ,ΓöÇvarvalueΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  498.  
  499.  
  500. Sets a global variable value for use across all REXX sessions.  A variable thus 
  501. set can be retrieved by any other REXX session via RXGETGLOBAL. 
  502.  
  503. You can set a global stem from a local stem by passing the global stem name 
  504. (which must have a trailing period) for varname and passing the local stem name 
  505. (which also must have a trailing period) for varvalue. 
  506.  
  507. Returns varvalue if successful. 
  508.  
  509. Example: 
  510.  
  511.      SomeVar = 'MyVar'
  512.      Call RxSetGlobal SomeVar,'Hello World!'
  513.      Say RxGetGlobal('MyVar')
  514.  
  515. Output: 
  516.  
  517.      Hello World!
  518.  
  519.  
  520. ΓòÉΓòÉΓòÉ 21. Get System wide global variable ΓòÉΓòÉΓòÉ
  521.  
  522. ΓöÇΓöÇΓöÇRXGETGLOBAL(ΓöÇΓöÇvarnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  523.  
  524.  
  525. Returns the value for varname, where varname was previously defined via 
  526. RXSETGLOBAL. 
  527.  
  528. If varname was not defined via RXSETGLOBAL, RXGETGLOBAL returns NULL. 
  529.  
  530. Example: 
  531.  
  532.      Call RxSetGlobal 'MyVar','Hello World!'
  533.      Say RxGetGlobal('MyVar')
  534.  
  535. Output: 
  536.  
  537.      Hello World!
  538.  
  539.  
  540. ΓòÉΓòÉΓòÉ 22. Pause the program ΓòÉΓòÉΓòÉ
  541.  
  542. ΓöÇΓöÇΓöÇRXNAP(ΓöÇΓöÇtimeΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  543.  
  544.  
  545. Puts a REXX program to sleep for a certain amount of time. 
  546.  
  547. The SysSleep function that comes with OS/2 will only put your program to sleep 
  548. for whole seconds. 
  549.  
  550. If the time specified (in milliseconds) is invalid, or is not passed to the 
  551. function, an INCORRECT CALL TO ROUTINE condition is raised from within REXX. 
  552.  
  553. Example: 
  554.  
  555.      Call RxNap 50       /* sleep for 1/20 of a second */
  556.  
  557. Results: 
  558.  
  559.      The REXX program will stop execution for 1/20 of a second
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 23. Save a listbox or combox box to a file ΓòÉΓòÉΓòÉ
  563.  
  564. ΓöÇΓöÇΓöÇRXLISTBOXTOFILE(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlbidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  565.  
  566.  
  567. Places the contents ListBox lbid of Window winid into file filename. 
  568.  
  569. If winid and/or filename are invalid/inaccessible, RXLISTBOXTOFILE raises the 
  570. REXX INCORRECT CALL TO ROUTINE error condition. Otherwise, RXLISTBOXTOFILE 
  571. returns an empty string (""). 
  572.  
  573. If lbid is omitted, winid is assumed to be the window handle of a listbox. 
  574.  
  575. Note:  This API erases all contents of file filename before writing to it. 
  576.  
  577. Example: 
  578.  
  579.      Call RxListBoxToFile window, 1000, 'C:\MyData.Dat'
  580.  
  581. Results: 
  582.  
  583.      The contents of ListBox 1000 of window window are written to
  584.      file C:\MyData.Dat.
  585.  
  586.  
  587. ΓòÉΓòÉΓòÉ 24. Save a listbox or combox box to a stemmed variable ΓòÉΓòÉΓòÉ
  588.  
  589. ΓöÇΓöÇΓöÇRXLISTBOXTOSTEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓöÇstemname.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  590.  
  591.  
  592. Places the contents of ListBox lbid of Window winid into stem stemname.  The 
  593. trailing period to stemname. is required; results are unpredictable if not 
  594. supplied. 
  595.  
  596. stemname.0 will contain the count of items to placed into it from ListBox lbid. 
  597. All other occurrences for stemname will be numeric, from 1 to n, where n is the 
  598. number contained in stemname.0. 
  599.  
  600. If winid and/or lbid are invalid, RXLISTBOXTOSTEM raises the REXX error 
  601. condition INCORRECT CALL TO ROUTINE. Otherwise, RXLISTBOXTOSTEM returns an 
  602. empty string (""). 
  603.  
  604. Note:  This API destroys any existing contents already in stem stemname. 
  605.  
  606. Example: 
  607.  
  608.      Call RxListBoxToStem window, 1000, 'MyStem.'
  609.  
  610. Results: 
  611.  
  612.      The contents of ListBox 1000 of window window will be copied
  613.      to stem MyStem.  Assuming there are 2 rows in ListBox 1000,
  614.      MyStem.0 will contain 2, and occurrences will exist for MyStem.1
  615.      and MyStem.2.
  616.  
  617.  
  618. ΓòÉΓòÉΓòÉ 25. Set text button to icon ΓòÉΓòÉΓòÉ
  619.  
  620. ΓöÇΓöÇΓöÇRXMORPHBUTTONTOICON(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓö¼ΓöÇVpLoadPictureHandleΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  621.                                       ΓööΓöÇpbidΓöÇΓöÿ ΓööΓöÇDLLnameΓöÇΓöÇ,ΓöÇΓöÇresourceΓöÇΓöÿ
  622.  
  623.  
  624. Converts a standard PushButton object pbid of window winid into a "Toolbox" 
  625. button. 
  626.  
  627. If any arguments are invalid or inaccessible, RXMORPHBUTTONTOICON raises the 
  628. REXX error condition INCORRECT CALL TO ROUTINE. Otherwise, RXMORPHBUTTONTOICON 
  629. returns an empty string (""). 
  630.  
  631. If pbid is ommitted, winid is assumed to be the window handle of a pushbutton. 
  632.  
  633. Note:  The use of DLLName, resource can be used by any PM REXX-based program, 
  634. and retrieves the requested icon.  If DLLname is in your LIBPATH, do not 
  635. specify an extension of '.DLL'. 
  636.  
  637. Note:  In order to make the window appear to start-up with your required icons, 
  638. you should call RXMORPHBUTTONTOICON immediately at entry to your program, when 
  639. the window is being opened.  Otherwise, the user will see the buttons change 
  640. appearance. 
  641.  
  642. Example: 
  643.  
  644.      value = VpLoadPicture('FILE','C:\TEMP\OS2CMD.ICO')
  645.      Call RxMorphButtonToIcon window, 2000, value
  646. or
  647.      Call RxMorphButtonToIcon window, id, 'MYDLL', 3
  648.  
  649. Results: 
  650.  
  651.      The PushButton with ID=2000 in window 'window'
  652.      is changed to an OS/2 Command-Prompt icon (stored previously in
  653.      C:\TEMP\OS2CMD.ICO, or as ICON number 3 in MYDLL.DLL)
  654.  
  655.  
  656. ΓòÉΓòÉΓòÉ 26. Search a listbox or combobox ΓòÉΓòÉΓòÉ
  657.  
  658. Searches a listbox for text. Doesn't have to be an entire line, it can be text 
  659. contained within one line of a listbox. 
  660.  
  661. RxSearchItem returns the line in the listbox that holds the text. 
  662.  
  663. ΓöÇΓöÇΓöÇRXSEARCHITEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ''ΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇrowΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ'F'ΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  664.                                       ΓööΓöÇmaskΓöÇΓöÿ           ΓööΓöÇ'B'ΓöÇΓöÿ
  665.  
  666.  
  667. Searches ListBox lbid of Window winid, starting at line row, for a line 
  668. containing the characters mask.  The search will procede forward or backward, 
  669. depending on the use of 'F' or 'B', respectively. 
  670.  
  671. If winid and/or lbid are invalid, RXSEARCHITEM raises the REXX error condition 
  672. INCORRECT CALL TO ROUTINE. Otherwise, RXSEARCHITEM returns the index number of 
  673. the first matching line, or 0 if no lines were found to match mask. 0 is used 
  674. to indicate no match. 
  675.  
  676. Note:  If NULL (i.e., '') is used for mask, the first item tested will match. 
  677. RXSEARCHITEM can therefore be used to retrieve the index of the last item in 
  678. ListBox lbid. 
  679.  
  680. Example: 
  681.  
  682.      JohnIsAt = RxSearchItem(window, 1000, 'John Smith', 1, 'F')
  683.  
  684. Results: 
  685.  
  686.      The contents of ListBox 1000 of window window will be searched,
  687.      starting at row 1 and proceding in a forward direction, looking
  688.      for any row that contains the characters 'John Smith'.  If found,
  689.      variable JohnIsAt will contain the index (row number) of the
  690.      matching entry.  Otherwise, JohnIsAt will contain 0.
  691.  
  692.  
  693. ΓòÉΓòÉΓòÉ 27. Get related PM window handle ΓòÉΓòÉΓòÉ
  694.  
  695. ΓöÇΓöÇΓöÇRXQUERYWINDOW(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ'Owner'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇ
  696.                               Γö£ΓöÇ'Parent'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  697.                               Γö£ΓöÇ'Next'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  698.                               Γö£ΓöÇ'Prev'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  699.                               Γö£ΓöÇ'Top'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  700.                               Γö£ΓöÇ'Bottom'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  701.                               Γö£ΓöÇ'NextTop'ΓöÇΓöÇΓöÇΓöÇΓöñ
  702.                               Γö£ΓöÇ'PrevTop'ΓöÇΓöÇΓöÇΓöÇΓöñ
  703.                               ΓööΓöÇ'FrameOwner'ΓöÇΓöÿ
  704.  
  705.  
  706. Returns the window handle for the requested related window to winid. 
  707.  
  708. Double-click on each window relation above for further information. 
  709.  
  710. If winid is invalid, RXQUERYWINDOW raises the REXX error condition INCORRECT 
  711. CALL TO ROUTINE. Otherwise, RXQUERYWINDOW returns the requested PM window 
  712. handle, in decimal. 
  713.  
  714. Example: 
  715.  
  716.      WinParent =  RxQueryWindow(window, 'Parent')
  717.  
  718. Results: 
  719.  
  720.      The parent window handle, in decimal, for window 'window'
  721.      is placed in the variable WinParent.
  722.  
  723.  
  724. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Owner') ΓòÉΓòÉΓòÉ
  725.  
  726. Requests the Owner window handle of winid.  The Owner window is the one which 
  727. window winid is dependent upon.  Quite frequently, this is the same as 
  728. 'Parent'. 
  729.  
  730.  
  731. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Parent') ΓòÉΓòÉΓòÉ
  732.  
  733. Requests the Parent window handle of winid.  The Parent window is the one that 
  734. causes window winid to be initialized. 
  735.  
  736.  
  737. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Next') ΓòÉΓòÉΓòÉ
  738.  
  739. Requests the Next window handle, in z-order, of winid.  This is the next window 
  740. at the same "level" as window winid. 
  741.  
  742.  
  743. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Prev') ΓòÉΓòÉΓòÉ
  744.  
  745. Requests the Previous window handle, in z-order, of winid.  This is the 
  746. previous window at the same "level" as window winid. 
  747.  
  748.  
  749. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Top') ΓòÉΓòÉΓòÉ
  750.  
  751. Requests the Topmost (first) "child" window handle of winid.  This is the first 
  752. window that window winid caused to be initialized. 
  753.  
  754.  
  755. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Bottom') ΓòÉΓòÉΓòÉ
  756.  
  757. Requests the Bottommost (last) "child" window handle of winid.  This is the 
  758. last window that window winid caused to be initialized. 
  759.  
  760.  
  761. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'NextTop') ΓòÉΓòÉΓòÉ
  762.  
  763. Requests the next window, in z-order, of the owner window hierarchy for winid. 
  764. See 'Owner'. 
  765.  
  766.  
  767. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'PrevTop') ΓòÉΓòÉΓòÉ
  768.  
  769. Requests the previous window, in enumeration order defined by NextTop, of the 
  770. owner window hierarchy for winid.  See 'Owner'. 
  771.  
  772.  
  773. ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'FrameOwner') ΓòÉΓòÉΓòÉ
  774.  
  775. Requests the owner of winid, normalized so that it shares the same window as 
  776. its Parent. 
  777.  
  778.  
  779. ΓòÉΓòÉΓòÉ 28. Get window class name ΓòÉΓòÉΓòÉ
  780.  
  781. ΓöÇΓöÇΓöÇRXQUERYCLASSNAME(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  782.  
  783.  
  784. Returns the Class Name for window winid. 
  785.  
  786. If winid is invalid, RXQUERYCLASSNAME raises the REXX error condition INCORRECT 
  787. CALL TO ROUTINE. 
  788.  
  789. If an error occurs, RXQUERYCLASSNAME returns "Error trying to query classs 
  790. name", otherwise, RXQUERYCLASSNAME returns the PM Class Name for the window. 
  791.  
  792. Example: 
  793.  
  794.      WinClass =  RxQueryClassName(window)
  795.  
  796. Results: 
  797.  
  798.      The Class Name of window 'window' is placed in the variable WinClass.
  799.  
  800.  
  801. ΓòÉΓòÉΓòÉ 29. Get line count for a file ΓòÉΓòÉΓòÉ
  802.  
  803. ΓöÇΓöÇΓöÇRXLINECOUNT(ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇ)ΓöÇΓöÇΓöÇ
  804.                   ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
  805.                                  ΓööΓöÇpath\ΓöÇΓöÿ
  806.  
  807.  
  808. Returns the number of lines in filename.  The lines in filename are assumed to 
  809. be delimited by CR/LF characters. 
  810.  
  811. If filename does not exist, RXLINECOUNT raises an 'Incorrect call to routine' 
  812. condition. 
  813.  
  814. Example: 
  815.  
  816.      SAY 'There are' RxLineCount('C:\CONFIG.SYS') 'lines in Config.Sys.'
  817.  
  818. Output: 
  819.  
  820.      There are 117 lines in Config.Sys.      /* perhaps */
  821.  
  822.  
  823. ΓòÉΓòÉΓòÉ 30. Maximize a window ΓòÉΓòÉΓòÉ
  824.  
  825. ΓöÇΓöÇΓöÇRXMAXIMIZE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  826.  
  827.  
  828. Causes window winid to become maximized. 
  829.  
  830. If winid is invalid, RXMAXIMIZE raises the REXX error condition INCORRECT CALL 
  831. TO ROUTINE. 
  832.  
  833. If an error occurs, RXMAXIMIZE returns "Error occured trying to maximize", 
  834. otherwise, RXMAXIMIZE returns an empty string (""). 
  835.  
  836. Example: 
  837.  
  838.      Call RxMaximize window
  839.  
  840. Results: 
  841.  
  842.      The window 'window' is maximized.
  843.  
  844.  
  845. ΓòÉΓòÉΓòÉ 31. Minimize a window ΓòÉΓòÉΓòÉ
  846.  
  847. ΓöÇΓöÇΓöÇRXMINIMIZE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  848.  
  849.  
  850. Causes window winid to become minimized. 
  851.  
  852. If winid is invalid, RXMINIMIZE raises the REXX error condition INCORRECT CALL 
  853. TO ROUTINE. 
  854.  
  855. If RXMINIMIZE encounters an error, it returns "Error trying to minimize", 
  856. otherwise, RXMINIMIZE returns an empty string (""). 
  857.  
  858. Example: 
  859.  
  860.      Call RxMinimize window
  861.  
  862. Results: 
  863.  
  864.      The window 'window' is minimized.
  865.  
  866.  
  867. ΓòÉΓòÉΓòÉ 32. Restore a window ΓòÉΓòÉΓòÉ
  868.  
  869. ΓöÇΓöÇΓöÇRXRESTORE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  870.  
  871. Restores window winid to its normal state after being maximized or minimized. 
  872.  
  873. If winid is invalid, RXRESTORE raises the REXX error condition INCORRECT CALL 
  874. TO ROUTINE. 
  875.  
  876. If an error occurs, RXRESTORE returns "Error trying to restore", otherwise, 
  877. RXRESTORE restores the requested PM window, and returns an empty string (""). 
  878.  
  879. Example: 
  880.  
  881.      Call RxRestore window
  882.  
  883. Results: 
  884.  
  885.      Restores the window 'window' from a minimised state.
  886.  
  887.  
  888. ΓòÉΓòÉΓòÉ 33. Load a bitmap into a free form window ΓòÉΓòÉΓòÉ
  889.  
  890. ΓöÇΓöÇΓöÇRXDRAWBITMAP(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓö¼ΓöÇVpLoadPictureHandleΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  891.                               ΓööΓöÇpbidΓöÇΓöÿ ΓööΓöÇDLLnameΓöÇΓöÇ,ΓöÇΓöÇresourceΓöÇΓöÿ
  892.  
  893.  
  894. Draws a bitmap in a free form window of id ffid in window winid. 
  895.  
  896. RXDRAWBITMAP will stretch the bitmap to take up the entire size of the free 
  897. form window. 
  898.  
  899. If any arguments are invalid or inaccessible, RXDRAWBITMAP raises the REXX 
  900. error condition INCORRECT CALL TO ROUTINE. 
  901.  
  902. If there is an error loading the bitmap from a DLL, RXDRAWBITMAP will return 
  903. "Error loading bitmap from DLL". 
  904.  
  905. Otherwise, RXDRAWBITAMP returns an empty string (""). 
  906.  
  907. If pbid is ommitted, winid is assumed to be a valid window handle. 
  908.  
  909. Note:  The use of DLLName, resource can be used by any PM REXX-based program, 
  910. and retrieves the requested bitmap.  If DLLname is in your LIBPATH, do not 
  911. specify an extension of '.DLL'. 
  912.  
  913.  Example: 
  914.  
  915.      value = VpLoadPicture('FILE','C:\OS2\BITMAP\OS2LOGO.BMP')
  916.      Call RxDrawBitmap window, 2000, value
  917.  
  918. Results: 
  919.  
  920.      The Free From window with ID=2000 in window 'window'
  921.      has the OS2LOGO bitmap drawn inside it or the bitmap
  922.      with number 3 in MYDLL.DLL is drawn in window 'MyWindow'.
  923.  
  924. Note:  This API may work with other window types, it just has not been tested 
  925. with them. 
  926.  
  927.  
  928. ΓòÉΓòÉΓòÉ 34. Scroll a listbox ΓòÉΓòÉΓòÉ
  929.  
  930. ΓöÇΓöÇΓöÇRXSCROLLISTBOX(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlbidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇnumLinesToScroll.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  931.  
  932.  
  933. Scrolls the ListBox lbid of Window winid by numLinesToScroll lines. A negative 
  934. value should be used to scroll up, a positive value to scroll the listbox down. 
  935.  
  936. If winid and/or lbid are invalid, RXSCROLLLISTBOX raises the REXX error 
  937. condition INCORRECT CALL TO ROUTINE. 
  938.  
  939. If lbid is omitted, winid is assumed to be the window handle of a listbox. 
  940.  
  941. if numLinesToScroll is not numeric, the listbox is simply not scrolled. 
  942.  
  943. Otherwise, RXSCROLLLISTBOX returns an empty string (""). 
  944.  
  945. REXX Example: 
  946.  
  947.      Call RxScrollListBox window, 1000, -3
  948.  
  949. Results: 
  950.  
  951.      The contents of ListBox 1000 of window window will be scrolled
  952.      up 3 lines
  953.  
  954.  
  955. ΓòÉΓòÉΓòÉ 35. Set/Get listbox item associated text ΓòÉΓòÉΓòÉ
  956.  
  957. ΓöÇΓöÇΓöÇRXLISTBOXITEMHANDLE(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlistboxidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇindexΓöÇΓöÇ[,ΓöÇΓöÇvalueΓöÇΓöÇ])ΓöÇΓöÇΓöÇ
  958.  
  959.  
  960. This call either sets or queries text associated with a ListBox item. It does 
  961. not change the text of the item or affect it in any other way. 
  962.  
  963. If winid and/or index are invalid, RXLISTBOXFROMSTEM raises an INCORRECT CALL 
  964. TO ROUTINE from within REXX. 
  965.  
  966. If the value parameter is omittted, RXLISTBOXITEMHANDLE returns the text 
  967. associated with that list box item (it's handle). 
  968.  
  969. If the value parameter is specified, RXLISTBOXITEMHANDLE sets the text 
  970. associated with that list box item to the value. 
  971.  
  972. If the listboxid  parameter is omitted, window is assumed to be the window 
  973. handle of a listbox. 
  974.  
  975. Example: 
  976.  
  977.      Call RxListBoxItemHandle window, 1000, 1, 'Line 1 must not be deleted'
  978.  
  979. Results: 
  980.  
  981.      The first item (index 1) with have the text
  982.      'Line 1 must not be deleted' associated with it.
  983.  
  984.      This text can be queried using RxListBoxItemHandle
  985.      by omitting the value parameter.
  986.  
  987.  
  988. ΓòÉΓòÉΓòÉ 36. Get executable program name ΓòÉΓòÉΓòÉ
  989.  
  990. ΓöÇΓöÇΓöÇRXGETEXENAME(ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  991.  
  992.  
  993. Returns the name of the executable currently running your REXX Code. 
  994.  
  995. Example: 
  996.  
  997.      Say "The current running program is "RxGetEXEName()
  998.  
  999. Results: 
  1000.  
  1001.      The current running program is CMD.EXE     /* possibly */
  1002.  
  1003.  
  1004. ΓòÉΓòÉΓòÉ 37. Get a list of available printers ΓòÉΓòÉΓòÉ
  1005.  
  1006. ΓöÇΓöÇΓöÇRXQUEUELIST(ΓöÇΓöÇstemΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1007.  
  1008.  
  1009. Returns a list of print queues available for the workstation. 
  1010.  
  1011. If stem is not a valid string, or is omitted, RXQUEUELIST raises an INVALID 
  1012. CALL TO ROUTINE condition from within REXX. 
  1013.  
  1014. RXQUEUELIST fills the stem passed with the Print Queues available. stem.0 
  1015. contains the number of queues available. stem.1 contains the first queue found, 
  1016. stem.2 contains the second queue, up to stem.n contain ing the nth queue, where 
  1017. n = stem.0. 
  1018.  
  1019. stem.n.DRIVERNAME holds the print driver associated with the nth queue. This 
  1020. will be needed for other printer API calls, as the Queue Name may not be 
  1021. unique. 
  1022.  
  1023. stem.default returns the index of the default queue (from 1 to stem.0). 
  1024.  
  1025. Example: 
  1026.  
  1027.      Call RxQueueList 'queues.'
  1028.      Do i = 1 to queues.0
  1029.        Say 'Queue 'i' is 'queues.i
  1030.      End
  1031.      def = queues.default
  1032.      Say 'The default print queue is 'queues.def
  1033.      Say 'The driver for this queue is 'queues.i.drivername
  1034.  
  1035. Output: 
  1036.  
  1037.      Queue 1 is Printer
  1038.      Queue 2 is Apple LaserWriter Plus on COM2
  1039.      Queue 3 is Epson LQ-580
  1040.      The default print queue is Apple LaserWriter Plus on COM2
  1041.      The driver for this queue is PSCRIPT.Apple LaserWriter
  1042.  
  1043.  
  1044. ΓòÉΓòÉΓòÉ 38. Set the default printer queue ΓòÉΓòÉΓòÉ
  1045.  
  1046. Sets the default print queue for a workstation. 
  1047.  
  1048. The parameter passed is the queue name concatenated to the driver name with a 
  1049. period. To produce this name from the stem returned by RxQueueList using the 
  1050. following code :- 
  1051.  
  1052.      queueAndDriverName = queues.1 || '.' || queues.1.drivername
  1053.  
  1054. If queueAndDriverName does not exist, RXQUEUESETDEFAULT raises an 'Incorrect 
  1055. call to routine' condition. 
  1056.  
  1057. See also RxQueueList for the correct way of obtaining queue and driver names. 
  1058.  
  1059. Example: 
  1060.  
  1061.      Call RxQueueSetDefault 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter'
  1062.  
  1063. Output: 
  1064.  
  1065.      The default queue will be changed to the Apple Laser Writer queue.
  1066.  
  1067.  
  1068. ΓòÉΓòÉΓòÉ 39. Display the job properties dialog for a queue ΓòÉΓòÉΓòÉ
  1069.  
  1070. ΓöÇΓöÇΓöÇRXQUEUEJOBPROPERTIES(ΓöÇΓöÇqueueAndDriverNameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1071.  
  1072.  
  1073. Asks the queue specified to display a 'Job Properties' dialog for the user, so 
  1074. that they can tailor options for an imminent print job. 
  1075.  
  1076. The parameter passed is the queue name concatenated to the driver name with a 
  1077. period. To produce this name from the stem returned by RxQueueList using the 
  1078. following code :- 
  1079.  
  1080.      queueAndDriverName = queues.1 || '.' || queues.1.drivername
  1081.  
  1082. If queueAndDriverName does not exist, RXQUEUEJOBPROPERTIES raises an 'Incorrect 
  1083. call to routine' condition. 
  1084.  
  1085. See also RxQueueList for the correct way of obtaining queue names and driver 
  1086. names. 
  1087.  
  1088. This function requires a Presentation Manager program to work correctly. 
  1089.  
  1090. Example: 
  1091.  
  1092.      Call RxQueueJobProperties 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter'
  1093.  
  1094. Output: 
  1095.  
  1096.      A job properties dialogue is displayed.
  1097.  
  1098.  
  1099. ΓòÉΓòÉΓòÉ 40. Write a stemmed variable to a printer queue ΓòÉΓòÉΓòÉ
  1100.  
  1101. ΓöÇΓöÇΓöÇRXQUEUEWRITESTEM(ΓöÇΓöÇqueueAndDriverName, stemΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1102.  
  1103.  
  1104. Writes the entries stem.1, stem.2, stem.3 to stem.n where n = stem.0, to the 
  1105. Queue identified by queueAndDriverName. 
  1106.  
  1107. The first parameter passed is the queue name concatenated to the driver name 
  1108. with a period. To produce this name from the stem returned by RxQueueList using 
  1109. the following code :- 
  1110.  
  1111.      queueAndDriverName = queues.1 || '.' || queues.1.drivername
  1112.  
  1113. If queueAndDriverName does not exist, or a stem is not specified, 
  1114. RXQUEUEWRITESTEM raises an 'Incorrect call to routine' condition. 
  1115.  
  1116. stem.jobname specifies the name that is to appear in the printer queue for this 
  1117. print job. 
  1118.  
  1119. stem.priority specifies the priority (1 to 99) that is to be given to this 
  1120. print job. 
  1121.  
  1122. stem.copies specifies the number of copies of this print image to be printed. 
  1123.  
  1124. See also RxQueueList for the correct way of obtaining queue names and driver 
  1125. names. 
  1126.  
  1127. This function requires a Presentation Manager program to work correctly. 
  1128.  
  1129. Example: 
  1130.  
  1131.      temp.0 = 3
  1132.      temp.1 = 'A line of print'
  1133.      temp.2 = 'may not be worth the paper it is printed on....'
  1134.      temp.3 = '                         Beware'
  1135.      temp.priority = 50
  1136.      temp.jobname = 'My Quote'
  1137.      temp.copies = 1000
  1138.      Call RxQueueWriteStem 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter', 'temp.'
  1139.  
  1140. Output: 
  1141.  
  1142.      One THOUSAND COPIES of the 3 line quote are produced on an
  1143.      Apple LaserWriter Plus printer.
  1144.      All text longer than one line is wrapped, and if the text is
  1145.      more than one page, multiple pages are written out.
  1146.  
  1147.  
  1148. ΓòÉΓòÉΓòÉ 41. Create an event semaphore ΓòÉΓòÉΓòÉ
  1149.  
  1150. ΓöÇΓöÇΓöÇRXEVENTCREATE(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1151.                            ΓööΓöÇΓöÇ,statusΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1152.  
  1153.  
  1154. Creates an event used for process or thread synchronisation. 
  1155.  
  1156. If the name or status (if passed) are invalid strings, RXEVENTCREATE raises an 
  1157. INCORRECT CALL TO ROUTINE from within REXX. 
  1158.  
  1159. RXEVENTCREATE returns a handle which uniquely identifies the event if 
  1160. successful, or "Error creating event" if unsuccessful. 
  1161.  
  1162. The handle returned is for use with RxEventDestroy. 
  1163.  
  1164. Example: 
  1165.  
  1166.      hEvent = RxEventCreate('FileLoad')
  1167.  
  1168. Output: 
  1169.  
  1170.      An event called 'FileLoad' is created and
  1171.      a handle to it is returned in hEvent.
  1172.  
  1173.  
  1174. ΓòÉΓòÉΓòÉ <hidden> RxEventCreate name, status ΓòÉΓòÉΓòÉ
  1175.  
  1176. The status parameter should be either 'Occurred' or 'Waiting'. Only the first 
  1177. character is significant, and defaults to 'Waiting'. 
  1178.  
  1179.  
  1180. ΓòÉΓòÉΓòÉ <hidden> RxEventWaitFor name, timeout ΓòÉΓòÉΓòÉ
  1181.  
  1182. The timeout parameter should be either a time specified in milliseconds or 
  1183. 'Forever'. Only the first character of 'Forever' is significant. 
  1184.  
  1185. 'Forever' is the default. 
  1186.  
  1187.  
  1188. ΓòÉΓòÉΓòÉ <hidden> RxResourceCreate name, status ΓòÉΓòÉΓòÉ
  1189.  
  1190. The status parameter should be either 'Owned' or 'Unowned'. Only the first 
  1191. character is significant, and defaults to 'Unowned'. 
  1192.  
  1193.  
  1194. ΓòÉΓòÉΓòÉ <hidden> RxResourceRequest name, timeout ΓòÉΓòÉΓòÉ
  1195.  
  1196. The timeout parameter should be either a time specified in milliseconds or 
  1197. 'Forever'. Only the first character of 'Forever' is significant. 
  1198.  
  1199. 'Forever' is the default. 
  1200.  
  1201.  
  1202. ΓòÉΓòÉΓòÉ 42. Destroy an event semaphore ΓòÉΓòÉΓòÉ
  1203.  
  1204. ΓöÇΓöÇΓöÇRXEVENTDESTROY(ΓöÇΓöÇhandleΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1205.  
  1206.  
  1207. Destroys the event used for process or thread synchronisation. 
  1208.  
  1209. If the handle is not passed, RXEVENTDESTROY raises an INCORRECT CALL TO ROUTINE 
  1210. from within REXX. 
  1211.  
  1212. RXEVENTDESTROY returns "" if successful. 
  1213.  
  1214. A valid handle is obtained when the event is created, using RxEventCreate. 
  1215.  
  1216. Example: 
  1217.  
  1218.      Call RxEventDestroy hEvent
  1219.  
  1220. Output: 
  1221.  
  1222.      An event called 'FileLoad' which was previously
  1223.      created, and whose hand is stored in hEvent is
  1224.      destroyed and a NULL string is returned.
  1225.  
  1226.  
  1227. ΓòÉΓòÉΓòÉ 43. Wait for an event to occur ΓòÉΓòÉΓòÉ
  1228.  
  1229. ΓöÇΓöÇΓöÇRXEVENTWAITFOR(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1230.                             ΓööΓöÇΓöÇ,timeoutΓöÇΓöÇΓöÇΓöÇΓöÿ
  1231.  
  1232.  
  1233. Waits for the event name used for process or thread synchronisation to occur. 
  1234. The REXX program that calls this function is blocked until either the event 
  1235. occurs, or the timeout period expires. 
  1236.  
  1237. If the name is not passed, RXEVENTDESTROY raises an INCORRECT CALL TO ROUTINE 
  1238. from within REXX. 
  1239.  
  1240. RXEVENTWAITFOR returns "Event occurred" if successful, "Timeout waiting for 
  1241. event", "Interrupted waiting for event", "Error waiting for event" if there is 
  1242. an error during waiting,  or "Error finding event" if the event name is 
  1243. incorrect. 
  1244.  
  1245. Example: 
  1246.  
  1247.      Call RxEventWaitFor 'FileLoad', 500
  1248.      Say result
  1249.  
  1250. Output: 
  1251.  
  1252.      An event called 'FileLoad' which was previously
  1253.      created is waited on for 1/2 a second.
  1254.      The REXX special variable result holds the value returned
  1255.      by the function call.
  1256.  
  1257.  
  1258. ΓòÉΓòÉΓòÉ 44. Set event occurred ΓòÉΓòÉΓòÉ
  1259.  
  1260. ΓöÇΓöÇΓöÇRXEVENTOCCURRED(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1261.  
  1262.  
  1263. Notifies any waiting programs that the event name has occurred. This tells all 
  1264. waiting programs to continue execution. Programs wait for an event by calling 
  1265. RxEventWaitFor. 
  1266.  
  1267. If the name is not passed, RXEVENTOCCURRED raises an INCORRECT CALL TO ROUTINE 
  1268. from within REXX. 
  1269.  
  1270. RXEVENTOCCURRED returns "" if successful, "Error finding event" if the event 
  1271. name is incorrect, or "Event already in 'occurred' state" if the event named 
  1272. has already occurred without being reset by RxEventReset. 
  1273.  
  1274. Example: 
  1275.  
  1276.      Call RxEventOccurred 'FileLoad'
  1277.  
  1278. Output: 
  1279.  
  1280.      An event called 'FileLoad' which was previously
  1281.      created is marked as 'occurred' and a NULL string is returned.
  1282.      All programs waiting on this event with RxEventWaitFor continue
  1283.      execution.
  1284.  
  1285.  
  1286. ΓòÉΓòÉΓòÉ 45. Reset event state ΓòÉΓòÉΓòÉ
  1287.  
  1288. ΓöÇΓöÇΓöÇRXEVENTRESET(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1289.  
  1290.  
  1291. Resets an event so that it is in a 'Waiting' state and sets the count of event 
  1292. occurrences back to zero. 
  1293.  
  1294. If the name is not passed, RXEVENTRESET raises an INCORRECT CALL TO ROUTINE 
  1295. from within REXX. 
  1296.  
  1297. RXEVENTRESET returns "Event occurred n times since last reset" if successful (n 
  1298. is a number), "Error finding event" if the event name is incorrect, or "Event 
  1299. already in 'reset' state" if the event named has already been reset. 
  1300.  
  1301. Example: 
  1302.  
  1303.      Say RxEventReset('FileLoad')
  1304.  
  1305. Output: 
  1306.  
  1307.      Event occurred 5 times since last reset
  1308.  
  1309.  
  1310. ΓòÉΓòÉΓòÉ 46. Get event occurred count ΓòÉΓòÉΓòÉ
  1311.  
  1312. ΓöÇΓöÇΓöÇRXEVENTQUERY(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1313.  
  1314.  
  1315. Returns the number of times an event has occurred since being reset. Programs 
  1316. reset an event by calling RxEventReset. 
  1317.  
  1318. If the name is not passed, RXEVENTQUERY raises an INCORRECT CALL TO ROUTINE 
  1319. from within REXX. 
  1320.  
  1321. RXEVENTQUERY returns a number if successful, "Error finding event" if the event 
  1322. name is incorrect, or "Error querying event" if some other error occurs. 
  1323.  
  1324. Example: 
  1325.  
  1326.      numTimes = RxEventQuery('FileLoad')
  1327.      Say 'The file was loaded' numTimes' times.'
  1328.  
  1329. Output: 
  1330.  
  1331.      The file was loaded 5 times.
  1332.  
  1333.  
  1334. ΓòÉΓòÉΓòÉ 47. Create a serial resource ΓòÉΓòÉΓòÉ
  1335.  
  1336. ΓöÇΓöÇΓöÇRXRESOURCECREATE(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1337.                               ΓööΓöÇΓöÇ,statusΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1338.  
  1339.  
  1340. Creates a resource used for process or thread serialisation. 
  1341.  
  1342. If the name or status (if passed) are invalid strings, RXRESOURCECREATE raises 
  1343. an INCORRECT CALL TO ROUTINE from within REXX. 
  1344.  
  1345. RXRESOURCECREATE returns a handle which uniquely identifies the event if 
  1346. successful, or "Error creating resource" if unsuccessful. 
  1347.  
  1348. The handle returned is for use with RxResourceDestroy. 
  1349.  
  1350. Example: 
  1351.  
  1352.      hRes = RxResourceCreate('FileWrite')
  1353.  
  1354. Output: 
  1355.  
  1356.      A resource called 'FileWrite' is created and
  1357.      a handle to it is returned in hRes.
  1358.  
  1359.  
  1360. ΓòÉΓòÉΓòÉ 48. Destroy a serial resource ΓòÉΓòÉΓòÉ
  1361.  
  1362. ΓöÇΓöÇΓöÇRXRESOURCEDESTROY(ΓöÇΓöÇhandleΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1363.  
  1364.  
  1365. Destroys the resource used for process or thread serialisation. 
  1366.  
  1367. If the handle is not passed, RXRESOURCEDESTROY raises an INCORRECT CALL TO 
  1368. ROUTINE from within REXX. 
  1369.  
  1370. RXRESOURCEDESTROY returns "" if successful. 
  1371.  
  1372. A valid handle is obtained when the event is created, using RxResourceCreate. 
  1373.  
  1374. Example: 
  1375.  
  1376.      Call RxResourceDestroy hResource
  1377.  
  1378. Output: 
  1379.  
  1380.      A resource called 'FileWrite' which was previously
  1381.      created, and whose handle is stored in hResource is
  1382.      destroyed and a NULL string is returned.
  1383.  
  1384.  
  1385. ΓòÉΓòÉΓòÉ 49. Request a serial resource ΓòÉΓòÉΓòÉ
  1386.  
  1387. ΓöÇΓöÇΓöÇRXRESOURCEREQUEST(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1388.                                ΓööΓöÇΓöÇ,timeoutΓöÇΓöÇΓöÇΓöÇΓöÿ
  1389.  
  1390.  
  1391. Waits for the resource name used for process or thread serialisation to become 
  1392. available. The REXX program that calls this function is blocked until either 
  1393. the resource becomes available, or the timeout period expires. 
  1394.  
  1395. If the name is not passed, RXRESOURCEREQUEST raises an INCORRECT CALL TO 
  1396. ROUTINE from within REXX. 
  1397.  
  1398. RXRESOURCEREQUEST returns "Resource available" when the resource becomes 
  1399. available, "Error finding event" if the event name is incorrect, or "Timeout 
  1400. waiting for resource" if the timeout period expires, "Interrupted waiting for 
  1401. resource" if OS/2 interrupts the request, or "Error waiting for resource" if 
  1402. there is an error during the request. 
  1403.  
  1404. Example: 
  1405.  
  1406.      Say RxResourceRequest('FileWrite')
  1407.  
  1408. Output: 
  1409.  
  1410.      Resource Available
  1411.  
  1412.      The REXX program is suspended until the resource 'FileWrite'
  1413.      is available.
  1414.  
  1415.  
  1416. ΓòÉΓòÉΓòÉ 50. Release a serial resource ΓòÉΓòÉΓòÉ
  1417.  
  1418. ΓöÇΓöÇΓöÇRXRESOURCERELEASE(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1419.  
  1420.  
  1421. Releases the named resource so that the next waiting program can obtain access 
  1422. to the resource. 
  1423.  
  1424. If the name is not passed, RXRESOURCERELEASE raises an INCORRECT CALL TO 
  1425. ROUTINE from within REXX. 
  1426.  
  1427. RXRESOURCERELEASE returns "" if successful, "Error finding resource" if the 
  1428. resource name is incorrect. 
  1429.  
  1430. Example: 
  1431.  
  1432.      Call RxResourceRelease 'FileWrite'
  1433.  
  1434. Output: 
  1435.  
  1436.      The resource called 'FileWrite' which was previously
  1437.      created is released so that other programs or threads can
  1438.      access it.
  1439.      Only one thread can obtain the resource at any point in time.
  1440.  
  1441.  
  1442. ΓòÉΓòÉΓòÉ 51. Get resource wait count ΓòÉΓòÉΓòÉ
  1443.  
  1444. ΓöÇΓöÇΓöÇRXRESOURCEQUERY(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1445.  
  1446.  
  1447. Returns the number of threads that are waiting for a resource. 
  1448.  
  1449. If the name is not passed, RXRESOURCEQUERY raises an INCORRECT CALL TO ROUTINE 
  1450. from within REXX. 
  1451.  
  1452. RXRESOURCEQUERY returns a number if successful, "Error finding resource" if the 
  1453. resource name is incorrect, or "Error querying resource" if some other error 
  1454. occurs. 
  1455.  
  1456. Example: 
  1457.  
  1458.      numWaiters = RxResourceQuery('FileWrite')
  1459.      Say 'There are' numWaiters' threads waiting to write to the file.'
  1460.  
  1461. Output: 
  1462.  
  1463.      There are 5 threads waiting to write to the file.
  1464.  
  1465.  
  1466. ΓòÉΓòÉΓòÉ 52. File exists? ΓòÉΓòÉΓòÉ
  1467.  
  1468. ΓöÇΓöÇΓöÇRXFILEEXISTS(file)ΓöÇΓöÇΓöÇ
  1469.  
  1470.  
  1471. Returns '1' if the file specified exists, '0' otherwise. 
  1472.  
  1473. RXFILEEXISTS will raise the REXX error condition INCORRECT CALL TO ROUTINE if a 
  1474. filename is not passed. 
  1475.  
  1476. Example: 
  1477.  
  1478.      If RxFileExists('C:\CONFIG.SYS') Then Say 'I found your CONFIG.SYS!'
  1479.  
  1480. Output: 
  1481.  
  1482.      I found your CONFIG.SYS       /* perhaps */
  1483.  
  1484.  
  1485. ΓòÉΓòÉΓòÉ 53. Get item text ΓòÉΓòÉΓòÉ
  1486.  
  1487. ΓöÇΓöÇΓöÇRXWINDOWQUERYTEXT(ΓöÇΓöÇwindowΓöÇΓöÇ[,ΓöÇΓöÇidΓöÇΓöÇ]ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1488.  
  1489. Returns the text of the window identified by either the window alone, or by the 
  1490. window and an id This will give you the text of an entry field or MLE, or 
  1491. static text. 
  1492.  
  1493. If window is an invalid string, RXWINDOWQUERYTEXT raises the REXX error 
  1494. condition INCORRECT CALL TO ROUTINE. 
  1495.  
  1496. This function was written specifically to correct bugs with MLE's in 
  1497. VisPro/REXX V1.1. 
  1498.  
  1499. Example: 
  1500.  
  1501.      value = RxWindowQueryText(window, 1001)
  1502.      /* id 1001 is an MLE */
  1503.  
  1504. Results: 
  1505.  
  1506.     Places the text of the window into the variable value.
  1507.  
  1508.  
  1509. ΓòÉΓòÉΓòÉ 54. Kill a process ΓòÉΓòÉΓòÉ
  1510.  
  1511. ΓöÇΓöÇΓöÇRXKILLPROCESS(ΓöÇΓöÇprocidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1512.  
  1513.  
  1514. Kills process procid. 
  1515.  
  1516. RXKILLPROCESS returns :- 
  1517.  
  1518. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1519. ΓöéReturn value             ΓöéReason                                  Γöé
  1520. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1521. Γöé"Killed"                 ΓöéProcess was successfully killed         Γöé
  1522. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1523. Γöé"Invalid data"           ΓöéAn internal error occurred - contact theΓöé
  1524. Γöé                         ΓöéRxExtras author.                        Γöé
  1525. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1526. Γöé"Invalid process id"     ΓöéThe parameter did not specify a valid   Γöé
  1527. Γöé                         Γöéprocess id.                             Γöé
  1528. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1529. Γöé"Zombie process"         ΓöéOS/2 considers the process unkillable.  Γöé
  1530. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1531. Γöé"Not a descendant        ΓöéWhen killing a tree of processes (not   Γöé
  1532. Γöéprocess"                 Γöéyet implemented), the process specified Γöé
  1533. Γöé                         Γöéwas not a descendant of the calling     Γöé
  1534. Γöé                         Γöéprocess.                                Γöé
  1535. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1536.  
  1537. Example: 
  1538.  
  1539.      If RxKillProcess(5) = "Killed" Then
  1540.         Say "Printing ceased"
  1541.  
  1542. Results: 
  1543.  
  1544.      Process number 5 is stopped permanently and
  1545.      rc should have the value "Killed"
  1546.  
  1547. Note:  Process id's can be obtained using the OS/2 command PSTAT or by using 
  1548. the RxExtras function RxQuerySwitchList. 
  1549.  
  1550.  
  1551. ΓòÉΓòÉΓòÉ 55. Set the number of file handles. ΓòÉΓòÉΓòÉ
  1552.  
  1553. ΓöÇΓöÇΓöÇRXSETFILEHANDLES(fileHandles)ΓöÇΓöÇΓöÇ
  1554.  
  1555.  
  1556. Returns an empty string ('') if the number of fileHandles available has been 
  1557. raised to the new value. 
  1558.  
  1559. The function can also return "Not enough memory", or "Invalid parameter" (when 
  1560. trying to set the file handles to a value less than it currently is). 
  1561.  
  1562. RXSETFILEHANDLES will raise the REXX error condition INCORRECT CALL TO ROUTINE 
  1563. if fileHandles is not passed, or is not greater than 0. 
  1564.  
  1565. Example: 
  1566.  
  1567.      If RxSetFileHandles(100) Then Say '100 file handles are now available'
  1568.  
  1569. Output: 
  1570.  
  1571.      100 file handles are now available       /* perhaps */
  1572.  
  1573.  
  1574. ΓòÉΓòÉΓòÉ 56. Set the relative number of file handles. ΓòÉΓòÉΓòÉ
  1575.  
  1576. ΓöÇΓöÇΓöÇRXADDFILEHANDLES(fileHandlesToAdd)ΓöÇΓöÇΓöÇ
  1577.  
  1578.  
  1579. RxAddFileHandles returns :- 
  1580.  
  1581. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1582. ΓöéReturn value             ΓöéReason                                  Γöé
  1583. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1584. ΓöéA number                 ΓöéCurrent number of file handles availableΓöé
  1585. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1586.  
  1587. RXADDFILEHANDLES will raise the REXX error condition INCORRECT CALL TO ROUTINE 
  1588. if fileHandles is not passed, or is not greater than 0. 
  1589.  
  1590. Example: 
  1591.  
  1592.      rc = RxAddFileHandles(100)
  1593.      Say '100 more file handles are now available'
  1594.      Say 'There are now 'rc' file handles available'
  1595.  
  1596. Output: 
  1597.  
  1598.      100 more file handles are now available
  1599.      There are now 121 file handles available
  1600.  
  1601.  
  1602. ΓòÉΓòÉΓòÉ 57. Match a filename to a wild card ΓòÉΓòÉΓòÉ
  1603.  
  1604. ΓöÇΓöÇΓöÇRXMATCHWILDCARD(ΓöÇΓöÇsourceΓöÇΓöÇ, ΓöÇΓöÇwildCardΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
  1605.  
  1606.  
  1607. RxMatchWildCard is used to search for and edit names of files and 
  1608. subdirectories.  Typically, it is used in conjunction with functions which do 
  1609. not permit the use of global file-name characters, to perform repetitive 
  1610. operations on files. 
  1611.  
  1612. An example of an editing operation is:- 
  1613.  
  1614.  source = "foo.bar"
  1615.  wildCard = "*.baz"
  1616.  Call RxMatchWildCard source, wildCard
  1617.  /* result = "FOO.BAZ" */
  1618.  
  1619. In the editing process, the string is changed to uppercase. 
  1620.  
  1621. Global file-name characters (?, *, .) have two uses:- searching and editing. 
  1622. If they are specified in source, they are interpreted as search characters; in 
  1623. wildCard, they are interpreted as editing characters. This difference can be 
  1624. illustrated with an example using the COPY utility.  The user types the 
  1625. following:- 
  1626.  
  1627.  copy *.old *.new
  1628.  
  1629. In the source, "*" acts as a search character and determines which files to 
  1630. return to the user. In the target, "*" functions as an editing character by 
  1631. constructing new names for the matched files. 
  1632.  
  1633. When used as search characters in source, global file-name characters simply 
  1634. match files and behave like any other search characters.  They have the 
  1635. following meanings:- 
  1636.  
  1637.  .         The period (.) has no special meaning itself, but "?"
  1638.            gives it one.
  1639.  
  1640.  *         The asterisk will form a match with any character,
  1641.            including a blank, or with the absence of a character.
  1642.            The matching operation does not cross the null
  1643.            character or the backslash (\), which means that only
  1644.            the file name is matched, not an entire path.
  1645.  
  1646.  ?         The question mark matches 1 character, unless what
  1647.            it would match is a "." or the terminating null
  1648.            characters, in which case it matches 0 characters.  It
  1649.            also does not cross "\".
  1650.  
  1651. Any character other than * and ? matches itself, including ".". 
  1652.  
  1653. Searching is not case-sensitive. 
  1654.  
  1655. If a file name does not have a period (.), an implicit one is automatically 
  1656. appended to the end during searching operations. For example, searching for 
  1657. "foo." would return "foo". 
  1658.  
  1659. When used in wildCard, global file-name characters have the following 
  1660. meanings:- 
  1661.  
  1662.  .         The period (.) in the target synchronizes pointers. It
  1663.            causes the source pointer to match a corresponding
  1664.            pointer to the period in the target.  Counting starts
  1665.            from the left of the pointers.
  1666.  
  1667.  ?         The question mark copies one character, unless what
  1668.            it would copy is a period (.), in which case it copies
  1669.            no characters. It also copies no characters when the
  1670.            end of the source string is reached.
  1671.  
  1672.  *         The asterisk copies characters from the source to the
  1673.            target until it finds a source character that matches
  1674.            the character following it in the target.
  1675.  
  1676. Editing is case-insensitive and case-preserving.  If conflicts arise between 
  1677. the case of the source and that of the editing string, the case of the editing 
  1678. string is used, for example:- 
  1679.  
  1680.  source string:      "file.txt"
  1681.  editing string:     "*E.TMP"
  1682.  result string: "filE.TMP"
  1683.  
  1684.  copy file.txt  *E.tmp  ->  filE.tmp
  1685.  
  1686. RXMATCHWILDCARD returns :- 
  1687.  
  1688. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1689. ΓöéReturn value             ΓöéReason                                  Γöé
  1690. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1691. Γöétext                     ΓöéThe result of editing the source and    Γöé
  1692. Γöé                         Γöéwildcard                                Γöé
  1693. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1694. Γöé"Invalid parameter"      ΓöéAn internal error occurred - contact theΓöé
  1695. Γöé                         ΓöéRxExtras author.                        Γöé
  1696. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1697. Γöé"Invalid name"           ΓöéEither the source or wildCard parameter Γöé
  1698. Γöé                         Γöédid not specify a valid string for      Γöé
  1699. Γöé                         Γöéediting.                                Γöé
  1700. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1701. Γöé"Unknown retured code x  ΓöéAn unknown return code was encountered. Γöé
  1702. Γöé                         ΓöéContact the author of RxExtras with the Γöé
  1703. Γöé                         Γöéreturn code info.                       Γöé
  1704. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1705.  
  1706. Example: 
  1707.  
  1708.      value = RxMatchWildCard('CONFIG.SYS', '*.BAK')
  1709.      Say "Creating a backup of your CONFIG.SYS in "value
  1710.  
  1711. Results: 
  1712.  
  1713.      Creating a backup of your CONFIG.SYS in CONFIG.BAK
  1714.