home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / ku.zip / SMALLKU.VRM < prev    next >
Text File  |  1993-10-26  |  4KB  |  192 lines

  1. /* Custom mainline for macro"s */
  2.     call RXFuncAdd "VRLoadFuncs", "VROBJ", "VRLoadFuncs"
  3.     call VRLoadFuncs
  4. /*:VRX         Main
  5. */
  6. /*  Main
  7. */
  8. Main:
  9. /*  Process the arguments.
  10.     Get the parent window.
  11. */
  12.     parse source . calledAs .
  13.     parent = ""
  14.     argCount = arg()
  15.     argOff = 0
  16.     if( calledAs \= "COMMAND" )then do
  17.         if argCount >= 1 then do
  18.             parent = arg(1)
  19.             argCount = argCount - 1
  20.             argOff = 1
  21.         end
  22.     end
  23.     InitArgs.0 = argCount
  24.     if( argCount > 0 )then do i = 1 to argCount
  25.         InitArgs.i = arg( i + argOff )
  26.     end
  27.     drop calledAs argCount argOff
  28.  
  29. /*  Load the windows
  30. */
  31.     call VRInit
  32.     parse source . . spec
  33.     _VREPrimaryWindowPath = ,
  34.         VRParseFileName( spec, "dpn" ) || ".VRW"
  35.     _VREPrimaryWindow = ,
  36.         VRLoad( parent, _VREPrimaryWindowPath )
  37.     drop parent spec
  38.     if( _VREPrimaryWindow == "" )then do
  39.         call VRMessage "", "Cannot load window:" VRError(), ,
  40.             "Error!"
  41.         _VREReturnValue = 32000
  42.         signal _VRELeaveMain
  43.     end
  44.  
  45. /*  Process events
  46. */
  47.     call Init
  48.     signal on halt
  49.     do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
  50.         _VREEvent = VREvent()
  51.         interpret _VREEvent
  52.     end
  53. _VREHalt:
  54.     _VREReturnValue = Fini()
  55.     call VRDestroy _VREPrimaryWindow
  56. _VRELeaveMain:
  57.     call VRFini
  58. exit _VREReturnValue
  59.  
  60. VRLoadSecondary: procedure
  61.     name = arg( 1 )
  62.  
  63.     window = VRLoad( VRWindow(), VRWindowPath(), name )
  64.     call VRMethod window, "CenterWindow"
  65.     call VRSet window, "Visible", 1
  66.     call VRMethod window, "Activate"
  67. return window
  68.  
  69. /*:VRX         Fini
  70. */
  71. Fini:
  72.     window = VRWindow()
  73.     call VRSet window, "Visible", 0
  74.     drop window
  75. return 0
  76.  
  77. /*:VRX         Halt
  78. */
  79. Halt:
  80.     signal _VREHalt
  81. return
  82.  
  83. /*:VRX         Init
  84. */
  85. Init:
  86.     window = VRWindow()
  87.     call VRMethod window, "CenterWindow"
  88.     call VRSet window, "Visible", 1
  89.     call VRMethod window, "Activate"
  90.     drop window
  91. return
  92.  
  93. /*:VRX         PB_10_Click
  94. */
  95. PB_10_Click:
  96. ok = VRMethod("Application", "StartThread", dinfo)
  97. return
  98.  
  99. /*:VRX         PB_11_Click
  100. */
  101. PB_11_Click:
  102. "dir a:/w"
  103. return
  104.  
  105. /*:VRX         PB_12_Click
  106. */
  107. PB_12_Click:
  108. "dir b:/w"
  109. return
  110.  
  111. /*:VRX         PB_1_Click
  112. */
  113. PB_1_Click:
  114. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  115. "formata.bat"
  116. return
  117.  
  118. /*:VRX         PB_2_Click
  119. */
  120. PB_2_Click:
  121. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  122. "formatb.bat"
  123. return
  124.  
  125. /*:VRX         PB_3_Click
  126. */
  127. PB_3_Click:
  128. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  129. "atoa.bat"
  130. return
  131.  
  132. /*:VRX         PB_4_Click
  133. */
  134. PB_4_Click:
  135. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  136. "atob.bat"
  137. return
  138.  
  139. /*:VRX         PB_5_Click
  140. */
  141. PB_5_Click:
  142. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  143. "btob.bat"
  144. return
  145.  
  146. /*:VRX         PB_6_Click
  147. */
  148. PB_6_Click:
  149. ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
  150. "btoa.bat"
  151. return
  152.  
  153. /*:VRX         PB_7_Click
  154. */
  155. PB_7_Click:
  156. ok = VRMethod("application", "StartThread", Ainfo)
  157.  
  158. return
  159.  
  160. /*:VRX         PB_8_Click
  161. */
  162. PB_8_Click:
  163. Ok = VRMethod("application", "StartThread", binfo)
  164. return
  165.  
  166. /*:VRX         PB_9_Click
  167. */
  168. PB_9_Click:
  169. ok = VRMethod("Application", "StartThread", cinfo)
  170. return
  171.  
  172. /*:VRX         Pict_1_Click
  173. */
  174. Pict_1_Click:
  175. return/*:VRX         Pict_2_Click
  176. */
  177. Pict_2_Click:
  178. exit/*:VRX         Quit
  179. */
  180. Quit:
  181.     window = VRWindow()
  182.     call VRSet window, "Shutdown", 1
  183.     drop window
  184. return
  185.  
  186. /*:VRX         Window1_Close
  187. */
  188. Window1_Close:
  189.     call Quit
  190. return
  191.  
  192.