home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 25
/
CD_ASCQ_25_1095.iso
/
dos
/
tools
/
auror21a
/
maclist.aml
< prev
next >
Wrap
Text File
|
1995-08-31
|
4KB
|
106 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, */
/* or press <ctrl f12>. */
/* ------------------------------------------------------------------ */
// 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
" ASCII2 2-Dimensional ASCII chart"
" BOOKLIST List all bookmarks"
" CALCPAD Calculator"
" CALEN4 Four-month calendar"
" CALENDAR One-month calendar"
" CLRCHART Color chart"
" COMPARE Compare two files"
" COMPRESS Display occurrences of a search string by folding lines"
" COUNTCHR Count the characters in a file or block"
" COUNTLIN Count the lines in multiple files"
" 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"
" DLGDEMO AML dialog box demo with dialog box controls"
" 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 string in a directory/filespec"
" SCRSAVER Screen Saver Install or Remove"
" STYLE Change the editor keyboard/menu style"
" SUMBLOCK Add up numbers in a marked block"
" TABS Detab a file or block"
" TABS e Entab a file or block"
" TEMPLATE Template Editing Install or Remove"
" WHERE Where-is 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" getvidcols - 11 getvidrows - 8
// 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