Introduction
This example demonstrates the MMScript_CreateImmediateScriptEvent function which calls a script immediately. It can be used for all sorts of interesting things. For the purposes of this example, we are going to keep things very simple as this is an introductory example. For more complex examples, check the Example Library site often or subscribe to one of our RSS feeds for updates.
To begin with, take a look at the function prototype:
MMScript_CreateImmediateScriptEvent(
Script {;
DB {;
EventName {;
EventValue {;
Priority {;
CurrentScript }}}}}
)
A function prototype is basically the format of a function. In the above example, note that there are several optional parameters indicated by curly brackets. This means that a function can take on different forms based on what you need to do.
Though there are six possible parameters for the MMScript_CreateImmediateScriptEvent function, only the "Script" parameter is actually required. For example, you can call the script "MyScript" in the current database as follows:
MMScript_CreateImmediateScriptEvent( "MyScript" )
Likewise, you could call the script "MyScript" in the "MyDatabase" database pass a script parameter using the following example code:
MMScript_CreateImmediateScriptEvent(
"MyScript" ;
"MyDatabase" ;
"MyEvent" ;
"My ScriptParameter value"
)
