How I include vbs files ?
There are 2 fairly standard solutions...
1) use .wsf file format...
<job>
<script language="vbscript" src="first.vbs" />
<script language="vbscript" src="second.vbs" />
...
<script language="vbscript">
...
...main vbscript code
...
</script
/job>
2) create WSCs to contain the common code which is then exposes a methods of a COM component. A
common convention is for the progid to match the file name (mostly because the Wizard uses that
convention) but it's NOT a requirement...
In main./vbs...
set first = createobject("first.wsc")
set second = createobject("second.wsc")
...
..
.
first.MySub arg1,arg2,...
result = second.MyFunction(arg1,arg2,...)
.
..
...
--
Michael Harris
MVP Scripting
Hi,
I have VBScript file (.vbs) and it seems to be quite large. How I can put
some subs in another vbs file and call then from the main.vbs file ?
For example I have main.vbs, first.vbs, second.vbs. First.vbs includes sub
called sub first1() etc.
So I like to call that first1() sub from main file how I do that.
-Jukka