Overview
Modules
in SprintDB Pro and the Desktop Companion are similar
to Saved Form Macros, the only difference is that
Modules are available to all the forms in your
database. Parameters can also be passed to a specific
module.
Building
a Module
- Click the Module tab in the Main Database
window.
- Click the New button. This will open the
Macro
Builder
window.
Create the Module code in exactly the same
manner as you would when creating a normal macro.
Calling
a Module
To call a module in a macro/script, use the CallModule()
macro command.
Passing
parameters
You
can pass a maximum of 10 parameters to a module. The
parameters should be variables (local or global). A
module can access(read/write) the parameters within
the module code.
Examples
Dim(v1)
Dim(v2)
SetVar(@v1,"hello!")
CallModule(MyModule1,@v1,@v2)
MsgBox(@v2)
In
a module, you can access (read/write) the parameters
by using @@paramN notation.
For example, in the MyModule1 you can access @v1, and
@v2 by using @@param1 and @@param2.
MsgBox(@@param1)
SetVar(@@param2,"hello from module1") |