1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'It Is possible To run a script within another script by using the
'MacroRun instruction.
'Suppose you want To Call ScriptB.Sbs within ScriptA.Sbs:

'--- ScriptA.Sbs
Sub Main
     'code before calling script B
     MacroRun "ScriptB.Sbs"
     'code afer having executed script B
End Sub

'MacroRun can pass a String parameter To the script it calls.
'The passed parameter can be retrieved With the Command$
'Function.
'So For example, it Is possible For ScriptB.sbs To show In a
'message box window the String parameter ScriptA.sbs has
'passed To it:

'--- ScriptA.Sbs
Sub Main
     'code before calling script B
     MacroRun "ScriptB.Sbs","Parameter"
     'code afer having executed script B
End Sub

'--- ScriptB.Sbs
Sub Main
     If Command$="" Then
          MsgBox "No paremeter"
     Else
          MsgBox "Parmater: "+Command$
     MsgBox
End Sub

'HTH
'Fabrizio