home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / vxrxs21a.zip / macros / vxrez / install.vrm < prev    next >
Text File  |  1994-10-31  |  2KB  |  51 lines

  1. /*
  2.  * install.vrm -- VXREZ installation routine.  Call this from the
  3.  *                VX-REXX profile.vrm file.
  4.  */
  5.  
  6.     parse arg main_window
  7.  
  8.     main_window = VRGet( main_window, "Self" )
  9.  
  10.     call VREMacroAdd "~Resource editor...", VREPath() || "MACROS\VXREZ\editres.vrm", "Window", "Open", "NotDefault"
  11.  
  12.     call ReplaceEvent "__VREProjRunMenuItem", "run.vrm", main_window
  13.     call ReplaceEvent "__VREProjMakeEXEMenuItem", "makeexe.vrm", main_window
  14.  
  15.     call VRCreate "__VREProjectMenu", "MenuItem", "Caption", "-"
  16.  
  17.     eventstr = 'call VRMacro "' || VREPath() || 'MACROS\VXREZ\editres.vrm"'
  18.     call VRCreate "__VREProjectMenu", "MenuItem",,
  19.                   "Caption", "Resource editor...",,
  20.                   "Accelerator", "{F2}",,
  21.                   "Click", eventstr
  22.  
  23. /*
  24.     eventstr = 'call VRMacro "' || VREPath() || 'MACROS\VXREZ\runexe.vrm"'
  25.     call VRCreate "__VREProjectMenu", "MenuItem",,
  26.                   "Accelerator", "{F3}",,
  27.                   "Caption", "Run EXE file",,
  28.                   "Click", eventstr
  29.                   */
  30.  
  31.     call VRMethod main_window, "InstallAccelerators"
  32.  
  33.     return
  34.  
  35. /*
  36.  * ReplaceEvent -- Find the event code for a given object, store it
  37.  *                 away and replace it with our own.
  38.  */
  39.  
  40. ReplaceEvent: procedure
  41.     parse arg name, file, main_window
  42.  
  43.     eventstr = VRGet( name, 'Click' )
  44.     call VRMethod 'Application', 'PutVar', 'eventstr', name
  45.  
  46.     eventstr = 'call VRMacro "' || VREPath() || 'MACROS\VXREZ\' || file
  47.     eventstr = eventstr || '", ' || main_window
  48.     call VRSet name, 'Click', eventstr
  49.  
  50.     return
  51.