Executes the specified macro (or specific macro action) and then returns control to the calling script.
object.RunMacro(macro)
Where object is an object expression that evaluates to one of the items in the Applies To list below.
Newlook Smartclient
Newlook Server
Use this method if you wish to call a Newlook macro from within your script and then continue execution of the current script.
The RunMacro method should not be used to call other scripts within your solution or external scripts. If you wish to execute a script then it is recommended that you use the GetModule method. See examples below.
This method should not be used to call a routine that exists within the calling script. If you are wanting to call a routine within the current script reference it explicitly.
macro (Literal, Required)
Specifies the name of the macro to execute. The name string should be specified in quotation marks. If you wish to specify a label within the macro at which to begin execution, use a period (.) to separate the macro and label name. To specify the macro name as an expression, prefix the macro with an equals (=) sign.
The following example executes the Demonstration macro, beginning execution at the 'Setup' label. VB SCRIPTApp.RunMacro "Demonstration.Setup" JSCRIPTApp.RunMacro ("Demonstration.Setup");
The following example executes the same Demonstration macro, however it specifies the macro name as an expression. VB SCRIPTvarMacroName = "Demonstration.Setup" App.RunMacro = varMacroName JSCRIPTvarMacroName = "Demonstration.Setup"; App.RunMacro = varMacroName;
The following example calls the InitializeMenu routine from the "SetupRoutines-JS" script and passes it the string "Menu1". Note that we are using the GetModule method here instead of the RunMacro method to illustrate an alternative method of calling scripts. VB SCRIPTScriptName = "SetupRoutines-VB" Set Script1 = GetModule(ScriptName) Script1.InitializeMenu("Menu1") JSCRIPTScriptName = "SetupRoutines-JS"; Script1 = GetModule(ScriptName); Script1.InitializeMenu("Menu1"); |
No returns.
RunMacro Action | GoToMacro Action | StopMacro Action | StopAllMacros Action
© 2004-2021 looksoftware. All rights reserved.