home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / apmt34.zip / SETTINGS.CMD < prev    next >
OS/2 REXX Batch file  |  1994-07-01  |  2KB  |  62 lines

  1. /******************************************************************/
  2. /* This program Reads the DOS settings values from  DOS window    */
  3. /* and displays them on the screen. This assumes that there an    */
  4. /* icon named 'DOS Window' on the desktop.                        */
  5. /******************************************************************/
  6. Trace off
  7. Call RxFuncAdd 'APMTLoadFuncs','APMTEXT','APMTLoadFuncs'
  8. Call APMTLoadFuncs
  9.  
  10. rc = INIT_SESSION()                        ; call logit
  11. if rc \= 0 then signal errorexit
  12. signal on halt name close
  13. rc = SELECT_WINDOW("Desktop")
  14. rc = SET_TIMEOUT(300)
  15. rc = KEYBOARD("\","C")
  16. rc = CONTAINER_SELECTITEM(1,"DOS Window")  ; call logit
  17. rc = KEYBOARD("F10","S")
  18. rc = POPUPMENU_SELECT("Open","Settings")   ; call logit
  19. rc = SELECT_WINDOW("*DOS Window*",100)     ; call logit
  20. rc = NOTEBOOK_PUSHTAB(1,"Session")         ; call logit
  21. rc = PUSHBUTTON_CLICK("DOS settings...")   ; call logit
  22. rc = SELECT_WINDOW("Dos Settings*",100)
  23.  
  24. rc = LISTBOX_QUERY_COUNT("1","items")
  25. do i = 1 to items
  26.    rc = LISTBOX_QUERY_TEXT(1,i-1,"text")    ; call logit
  27.    rc = LISTBOX_SELECTITEM("1",i-1)         ; call logit
  28.    rb.0 = 0
  29.    rc = RADIOBUTTON_QUERY_ALL("rb")
  30.    if rb.0 > 0 then
  31.       do j = 1 to rb.0
  32.          rc = RADIOBUTTON_QUERY_STATE(rb.j,"state")
  33.          if (state.1 = "CHECKED") then
  34.             say text "----> "rb.j
  35.             else NOP
  36.          end
  37.      else do
  38.         rc = ENTRYFIELD_QUERY_TEXT(1,"text1")  ; call logit
  39.         say text "----> "text1
  40.         end
  41.    end
  42. rc = PUSHBUTTON_CLICK("Cancel")                ; call logit
  43. rc = WAIT(4000)
  44. rc = SELECT_WINDOW("*DOS Window*",100)         ; call logit
  45. rc = SYSMENU_SELECT("Close")                   ; call logit
  46.  
  47. close:
  48. rc = END_SESSION();
  49.  
  50. exit
  51. /******************************************************************/
  52. logit:
  53. code=Strip(rc)
  54. Parse Value Sourceline(sigl) With 'rc = ' function ';'
  55. out = 'Return code' code 'from' function 'in line number' sigl
  56. if code > 0 then do
  57.   say out
  58.   Say '---> 'apmtmsg
  59.   exit
  60.   end
  61. return
  62.