Commands & Syntax > Commands > Run/Execute >

www.MacroToolworks.com

.MCR FILE - < extmacro >() ... [Pro]

 

Run .MCR FILE
<extmacro>("File path",Text insertion method,"Parameters","Time to wait")
Available in: Professional edition

Runs macro saved in an external text file. It is possible to pass the external macro a parameter and it is also possible to receive a return data from the macro. If the macro returns some data then the data are available through "_vMacroResult" system variable right after the command finishes execution.

 

#

Parameter name

Parameter description

1

File path

Name of the macro to run. (The macro name should be unique if it is run from other macros using command).

2

Text insertion method

If 1, the text from the MacroFile is inserted to the active window through the clipboard. (This option is intended only for plain text with no commands.) If 0, the macro from the MacroFile is played back the same way as it was regular macro.

3

Parameters

Parameter that will be passed to the remote macro. The called macro can retrieve the parameter data from "_vMacroParameter" system variable.

4

Time to wait

Time in milliseconds to wait before next command is executed. If this parameter is empty then a default wait time is used.

 

Example (Macro Steps):

 

1

<#> <#> This macro starts macro from external file.

2

Macro execution: ONLY COMMANDS

3

Run .MCR FILE run macro "%_vMacroFileFolder%Samples\Simple form example.mcr" with parameter "". Text insertion method is "Keystrokes sequence". Parameters =

Example (Plain Text):

 

<#> This macro starts macro from external file.

<#>

<cmds>

<extmacro>("%_vMacroFileFolder%Samples\Simple form example.mcr",0)