home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
DOS
/
TEKST
/
AURORA2
/
MACLIST.AML
< prev
next >
Wrap
Text File
|
1995-04-28
|
4KB
|
105 lines
/* ------------------------------------------------------------------ */
/* Macro: MACLIST.AML */
/* Written by: nuText Systems */
/* */
/* Description: This macro displays a scrollable list of macros, */
/* showing the macro name and description for each */
/* macro in the list. Selecting a macro from the list */
/* will run the macro. */
/* */
/* Usage: Select the 'Macro List' item from the Macro menu. */
/* If you use this macro regularly, assign it to a key */
/* in the 'edit_fmgr' object. For example: */
/* */
/* object edit_fmgr */
/* */
/* key <shift f12> */
/* runmacro getbootpath + "MACRO\\MACLIST.X" */
/* end */
/* ------------------------------------------------------------------ */
// compile time macros and function definitions
include bootpath "define.aml"
// macro list buffer id
buffer = "maclist"
// create a macro list buffer
// (modify this list to suit your own preferences)
databuf buffer
" CALCPAD Calculator"
" CALENDAR Calendar"
" CLRCHART Color Chart"
" COMPRESS Display occurrences of a search string by folding lines"
" COUNTCHR Count the characters in a file or block"
" COUNTWRD Count the words in a file or block"
" DELBLANK Delete blank Lines in a file or block"
" DELDUP Delete duplicate lines in a file"
" DESKOPEN Open and restore a previously saved desktop layout"
" DESKSAVE Save the current desktop layout to a file"
" DRAWBOX Draw a box around a column mark"
" FULLDATE Display the current date and time in full-format"
" INSTALL Run Installation"
" KEYCODES Display various keycodes for any key pressed"
" KEYDEF Display the assigned state of each assignable key"
" LONGLINE Go to the longest line in the current file"
" PALETTE Change the color palette"
" SCAN2 Find all occurrences of a search string in multiple files"
" SUMBLOCK Add up numbers in a marked block"
" TABS Detab a file or block"
" TABS e Entab a file or block"
" WHERE 'Whereis' utility - locate files on any disk drive"
end
// name the buffer so the menu position will be remembered
setbufname "mlist"
// display the popup menu
line = popup buffer "Macro Description" 69
// destroy the menu
destroybuf buffer
// run the selected macro
if line then
macro = line [1 : posnot ' ' line [1 : 11] 'r']
// separate file and parameter (if any)
var parameter
splitstr ' ' macro ref macro ref parameter
case macro
// desktop functions are not implemented as external macros
when "DESKOPEN"
file = ask "Restore desktop from file" "_load"
if file then
if opendesk (qualify file (getbufname)) then
restoredesk
else
msgbox "Can't open " + file
end
end
when "DESKSAVE"
file = ask "Save current desktop to file" "_load"
if file then
currdesk
if savedesk (qualify file (getbufname)) then
display
else
msgbox "Can't save " + file
end
end
// queue for execution to minimize interpreter stack usage
when "INSTALL"
queue "runmacro" (bootpath macro + ".X")
otherwise
queue "runmacro" getbootpath + "MACRO\\" + macro + ".X" parameter
end
end