Variable: ScriptScope
- Updated2024-09-12
- 1 minute(s) read
Variable: ScriptScope
Variable: ScriptScope
Specifies the name space of a script. By default the ScriptCode variable contains an empty text.
| Definition | ScriptScope, String variable |
| Maximum 255 characters |
Use the name space to distinguish between procedures that have the same names, in different script files.
Example
The following example assumes that the MyFunc function is in the Test.vbs script as well as the MyLib.vbs script. You can use the name space to distinguish between the two functions. In the example, the MyResult variable receives the result of the MyFunc function in the Test.vbs file and the MyOtherResult variable receives the result of the MyFunc function in the MyLib.vbs file.
| VBScript | Python |
Dim MyResult Dim MyOtherResult ScriptScope = "Test" Call ScriptInclude("Test.vbs",ScriptScope) ScriptScope = "GlobalLib" Call ScriptInclude("MyLib.vbs",ScriptScope) MyResult = Test.MyFunc MyOtherResult = GlobalLib.MyFunc