Re: Include a vbs file into another vbs file



Jake wrote:
What is the syntax for including a vbs file in this scenario?


Jake, if you are willing to compromise your requirements
a bit, and use a "wsf" file instead of a vbs file, then
you may include other scripts with a "one-liner".
For example:

--- <code> ---
<?XML version="1.0" standalone="yes" encoding="iso-8859-1" ?>
<job id="demoWSF">
<comment> This "includes" the cbt hookingini code... </comment>
<script language="VBScript" src="incOpenFileDlgDeclarations.vbs" ></script>

<script language="VBScript">
<![CDATA[
' ===================
' your script goes here...
' ===================


]]>
</script>
</job>
--- </code> ---

As usual, you can find the documentation for a "wsf" file
in the scripting documentation.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)





.



Relevant Pages

  • Re: Looking for "Terminate Event" in Windows Script Components???
    ... Some of them might indeed be contained within a block in a .wsf ... there is a way to instantiate a component from an unregistered .wsc file ... The advantage of registering a WSC is that referencing scripts need not know ...
    (microsoft.public.scripting.wsh)
  • Re: Setting new date with offset in days
    ... or .vbs or .wbs scripts. ... You mean .wsf instead? ... Usual file extensions: .vbs, .asp ... VBScript .vbs files can be included in two other types of scripting files: ...
    (comp.lang.javascript)
  • Re: debugging .wsf files for use under WSH
    ... > SRC element to include .vbs files with library code in them, and wsf files ... editor, it has the desired features like highlighting and intellisense. ... Most of my scripts run under wscript, so if I forget to remove the debugging ...
    (microsoft.public.scripting.wsh)
  • Re: call vbs from within vbs
    ... number of related administrative scripts. ... Our scripts are in .wsf format. ... > Exit Sub ... > Call LoadGroups(objPriobject, objGroup) ...
    (microsoft.public.scripting.vbscript)
  • Re: More than one vbs file
    ... but most languages have such a funcion so I was very suprised. ... Since I wrote our scripts, I am the one that gets the call ... > Don't move them into statically included .vbs file, ... In addition to the above noted problems, ...
    (microsoft.public.scripting.vbscript)

Loading