home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR8 / GCMACRO.ZIP / MACROS < prev    next >
Text File  |  1993-05-10  |  2KB  |  43 lines

  1. // SHORT MACROS TO BURN INTO SE
  2.  
  3. /******************************************************************************
  4.   12 April 93: G. Grafton Cole                                  ENHANCED SORT
  5.  
  6.   This can be assigned to a key.  I hate menus.
  7.  *****************************************************************************/
  8. menu SortTypeMenu()
  9.   "Sort &Ascending"
  10.   "Sort &Descending"
  11.   "Sort Ascending  &Nocase"
  12.   "Sort Descending n&Ocase"
  13. end
  14.  
  15. proc mSort()
  16.   SortTypeMenu()
  17.   Sort(MenuOption()-1)
  18. end
  19.  
  20. /*****************************************************************************
  21.   7 May 93: G. Grafton Cole                               ENHANCED MACRO LOAD
  22.  
  23.   Pass the name of the macro to execute.  Will check for an enviornmental
  24.     variable SEMAC, current directory, and finally DOS path.  Could return
  25.     message "NOT FOUND", but that adds bytes.  I burn this macro into SE. It
  26.     is used to invoke ShareSpell and the SS1WORD addition to ShareSpell.  This
  27.     keeps bytes out of SE unless I really need spell checking.
  28.  ****************************************************************************/
  29.  
  30. integer proc mExecMacro(string macro)
  31.     string macEV[30] = GetEnvStr("SEMAC")   // EV path to SE macros
  32.  
  33.     if Length(macEV)                        // is there an EV path
  34.         ExecMacro(macEV+"\"+macro)
  35.     elseif  FileExists(LoadDir()+macro)     // if not in environment assume
  36.         ExecMacro(LoadDir()+macro)          //   SS in same directory as SE
  37.     else
  38.         ExecMacro(macro)                    // hope it's on the path
  39.     endif
  40.     return(FALSE)
  41. end
  42.  
  43.