home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Utilities / Disk / CMInstall / CLIMasterII / modules / user.g < prev    next >
Encoding:
Gui4CLI script  |  1998-06-24  |  2.4 KB  |  133 lines

  1. G4C
  2.  
  3. winbig 116 67 390 78 "User Command List Editor"
  4. winsmall -1 -1 390 78
  5. wintype 11110000
  6. winout nil:
  7. varpath "climaster/*/usred.g"
  8.  
  9. xonload
  10. guiopen user.g
  11.  
  12. xonopen
  13. lvuse user.g 1
  14. ifexists file cmst:config/user.com
  15.     lvchange cmst:config/user.com
  16. endif
  17. update user.g 4 0
  18.  
  19. xonclose
  20. lvuse climaster $cm_srce
  21. guiquit usred.g
  22. guiquit user.g
  23.  
  24. xonrmb
  25. guiclose user.g
  26.  
  27. box 300 13 90 13 in button
  28.  
  29. xlistview 0 26 300 55  "" extprg "" 0 multi
  30. gadid 1
  31. guiwindow user.g wait
  32. guiopen usred.g
  33. cutvar extprg cut word 1 cm_gpvar
  34. extract extprg clean extprg
  35. extract extprg unquote extprg
  36. update usred.g 1 $extprg
  37. setgad usred.g 1 on
  38.  
  39. xtextin 0 0 300 13  "" extprg "" 512
  40. gadid 2
  41. gosub user.g headercheck
  42.  
  43. xtextin 0 13 300 13  Arguments args "" 512
  44. gadid 3
  45. gadtitle right
  46.  
  47. xcycler 300 26 90 13  "" cm_run
  48. gadid 4
  49. cstr "CLI" "[CLI]"
  50. cstr "RUN" "[RUN]"
  51.  
  52. xbutton 300 39 90 13 "Add Comm."
  53. lvuse user.g 1
  54. if $extprg > ""
  55.     if $cm_run == "[cli]"
  56.     or $cm_run == "[run]"
  57.         lvadd "$cm_run  $extprg $args"
  58.     else
  59.         lvadd "$cm_run  $extprg"
  60.         setgad user.g 4 on
  61.         update user.g 4 0
  62.     endif
  63. update user.g 2 ""
  64. update user.g 3 ""
  65. lvsave cmst:config/user.com
  66. endif
  67.  
  68. xbutton 300 52 90 13 "Del Comm."
  69. lvmulti first
  70. if $$lv.line > ''
  71.     while $$lv.line > ''
  72.         lvdel -1
  73.         lvmulti first
  74.     endwhile
  75. endif
  76. if $$lv.total > 0
  77.     lvsave cmst:config/user.com
  78. elseif $$lv.total = 0
  79. andifexists file cmst:config/user.com
  80.     delete cmst:config/user.com
  81. endif    
  82.  
  83. xbutton 300 65 90 13 "Del List"
  84. ifexists file cmst:config/user.com
  85.     ezreq "DELETE LIST: Are You Sure?" "Delete|Cancel" opt
  86.     if $opt = 1
  87.         delete cmst:config/user.com
  88.         lvclear
  89.     endif
  90. endif
  91.  
  92. xbutton 300 0 90 13 Command
  93. update user.g 2 ""
  94. reqfile -1 -1 240 -60 "Choose Command..." load extprg SYS:
  95. extract extprg unquote extprg
  96. update user.g 2 $extprg
  97. gosub user.g headercheck
  98.  
  99. xroutine headercheck
  100. ifexists file $extprg
  101.     if $extprg H= "G4C"
  102.         cm_run = "[GUI]"
  103.         setgad user.g 4 off
  104.     else
  105.         setgad user.g 4 on
  106.     endif
  107. else
  108.     update user.g 2 ""
  109. endif
  110.  
  111. ; -------------------------------------
  112.  
  113. newfile usred.g
  114.  
  115. winbig -1 -1 400 13 "Edit User Command"
  116. wintype 11000000
  117. varpath 'user.g'
  118.  
  119. xonclose
  120. guiwindow user.g resume
  121. update usred.g 1 ""
  122.  
  123. xtextin 0 0 400 13 "" extprg "" 512
  124. gadid 1
  125. if $extprg > ""
  126.     lvput '$cm_gpvar  $extprg'
  127.     lvsave cmst:config/user.com
  128. endif
  129. guiwindow user.g resume
  130. guiclose usred.g
  131.  
  132. ; -------------------------------------
  133.