Previous Topic

Next Topic

Inhoudsopgave

Book Index

Merge Scripts

Isah VBScripting allows you to use code from other scripts. This is also known as script merging. The main advantage of this is that it enables you to re-use code. Subroutines that occur frequently do not have to be repeated in every script. A maximum number of 10 linked scripts are allowed.

Example

Script 1

DebugScript

Sub Debug( Text )

MsgBox Text

End Sub

Script 2

TestScript

Rem# DebugScript

Sub Main()

Call Debug( "A message" )

End Sub

Remarks

If you temporarily want to disable the merging of scripts, you can do so by inserting the following text:

Rem # DebugScript

Please note that inserting the blank space between rem and the number sign (#) is the only method that works. The usual method will not work:

' Rem# DebugScript

In this case, the script will be merged.