Executes a specified macro.
nResult = editor.ExecuteMacro( strMacroFileName, nFlags );
nResult = editor.ExecuteMacro( strMacroFileName, nFlags )
strMacroFileName
Specifies the path and file name of the macro file you want to run, or a macro text on memory that you want to run.
nFlags
Specifies a combination of the following values.
eeRunFile |
The strMacroFileName parameter specifies the path and file name of the macro file. |
eeRunText |
The strMacroFileName parameter specifies a macro text on memory. |
eeMacroLangJScript |
The macro is JavaScript. |
eeMacroLangVBScript |
The macro is VBScript. |
The return value is not used.
editor.ExecuteMacro( "E:\\Macros\\Macro.jsee", eeRunFile | eeMacroLangJScript );
editor.ExecuteMacro( "alert('Hello')", eeRunText | eeMacroLangJScript );
editor.ExecuteMacro "E:\Macros\Macro.jsee", eeRunFile Or eeMacroLangJScript
editor.ExecuteMacro "alert('Hello')", eeRunText Or eeMacroLangJScript
Supported on EmEditor Professional Version 17.0 or later.