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

  1. /* ------------------------------------------------------------------ */
  2. /* Macro:        PALETTE.AML                                          */
  3. /* Written by:   nuText Systems                                       */
  4. /*                                                                    */
  5. /* Description:  This macro changes the current color palette in      */
  6. /*               COLOR.AML and re-compiles the editor.                */
  7. /*                                                                    */
  8. /* Usage:        Select this macro from the Macro List (on the Macro  */
  9. /*               menu), or run it from the macro picklist <shift f12> */
  10. /* ------------------------------------------------------------------ */
  11.  
  12.   // compile time macros and function definitions
  13.   include  bootpath "define.aml"
  14.  
  15.   menu "colors"
  16.     item " &Blue and green"   "blugreen"
  17.     item " &Fluorescent"      "fluoresc"
  18.     item " &Green charcoal"   "greench"
  19.     item " &Red and blue"     "redblue"
  20.     item " &Wimbledon"        "wimbledn"
  21.   end
  22.  
  23.   // display the palette menu
  24.   palette = popup "colors" "Select a color palette to install" 37
  25.   if palette then
  26.  
  27.     // backup the existing color palette
  28.     copyfile (bootpath "COLOR.AML") (bootpath "COLOR.OLD")
  29.  
  30.     // copy the selected palette to COLOR.AML
  31.     if copyfile (getbootpath + "PALETTE\\" + palette + ".AML")
  32.                 (bootpath "COLOR.AML") then
  33.       // recompile the editor
  34.       send "recompile"
  35.     end
  36.   end
  37.  
  38.   // destroy the palette menu
  39.   destroybuf "colors"
  40.  
  41.