home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / tools / aurora21 / style.aml < prev    next >
Text File  |  1995-08-10  |  2KB  |  49 lines

  1. /* ------------------------------------------------------------------ */
  2. /* Macro:        STYLE.AML                                            */
  3. /* Written by:   nuText Systems                                       */
  4. /*                                                                    */
  5. /* Description:  This macro changes the current edit keyboard and     */
  6. /*               menu style (KBD.AML/MENU.AML) and recompiles the     */
  7. /*               editor.                                              */
  8. /*                                                                    */
  9. /* Usage:        Select this macro from the Macro List (on the Macro  */
  10. /*               menu), or run it from the macro picklist <shift f12> */
  11. /* ------------------------------------------------------------------ */
  12.  
  13.   // compile time macros and function definitions
  14.   include  bootpath "define.aml"
  15.  
  16.   // create the style menu
  17.   menu "style"
  18.     item " &Aurora"                 "AU"
  19.     item " Aurora/&CUA/Windows"     "CU"
  20.     item " &Brief"                  "BR"
  21.     item " &MultiEdit"              "ME"
  22.     item " &QEdit/TSE"              "QE"
  23.     item " Word&Perfect"            "WP"
  24.     item " &WordStar/Borland IDE"   "WS"
  25.   end
  26.  
  27.   // get the editor style
  28.   style = popup "style" "Which editor style would you like to use?"
  29.   if style then
  30.  
  31.     // backup the existing style files
  32.     copyfile (bootpath "KBD.AML") (bootpath "KBD.OLD")
  33.     copyfile (bootpath "MENU.AML") (bootpath "MENU.OLD")
  34.  
  35.     // copy the selected style files to the main install path
  36.     if copyfile (getbootpath + "STYLE\\" + style + "KBD.AML")
  37.                 (bootpath "KBD.AML") then
  38.       if copyfile (getbootpath + "STYLE\\" + style + "MENU.AML")
  39.                   (bootpath "MENU.AML") then
  40.         // recompile the editor
  41.         send "recompile"
  42.       end
  43.     end
  44.   end
  45.  
  46.   // destroy the style menu
  47.   destroybuf "style"
  48.  
  49.