MacroList
MacroList (matchStr, separatorStr, optionsStr)
The MacroList function returns a string containing a list of the names of user-defined procedures that start with the Proc, Macro, or Window keywords that also satisfy certain criteria. Note that if the procedures need to be compiled, then MacroList may not list all of the procedures.
Parameters
Only macros having names that match matchStr string are listed. See WaveList for examples.
The first character of separatorStr is appended to each macro name as the output string is generated. separatorStr is usually ";" for list processing (See the Processing Lists of Waves topic in the Programming Techniques help file for details on list processing).
optionsStr is used to further qualify the macros. It is a string containing keyword-value pairs separated by commas. Available options are:
| KIND:nk |
| ||||||
| nk can be the sum of these values to match multiple procedure kinds. For example, use 3 to list both Proc and Macro procedures. | |||||||
| NPARAMS:np | Restricts the list to macros having exactly np parameters. Omitting this option lists macros having any number of parameters. | ||||||
| SUBTYPE:typeStr | Lists macros that have the type typeStr. That is, you could use ButtonControl as typeStr to list only macros that are action procedures for buttons. | ||||||
| WIN:windowNameStr | Lists macros that are defined in the named procedure window. "Procedure" is the name of the built-in procedure window. | ||||||
note Because the optionsStr keyword-value pairs are comma separated and procedure window names can have commas in them, the WIN: keyword must be the last one specified. | |||||||
Examples
To list all Macros with three parameters:
Print MacroList("*",";","KIND:2,NPARAMS:3")
To list all Macro, Proc, and Window procedures in the main procedure window whose names start with b:
Print MacroList("b*",";","WIN:Procedure")
See Also
FunctionList, StringFromList, WinList
For details on procedure subtypes, see Procedure Subtypes, Button, CheckBox, SetVariable, PopupMenu.