Hi all,

Doug outlined the following code for performing an include:

sub include( strFileName)
        dim fso : set fso = createObject("Scripting.FileSystemObject")
        dim oFile : set oFile = fso.openTextFile( strFileName, 1)
        dim sContents : sContents = oFile.readAll
        oFile.close
        executeGlobal sContents
end sub

This works fine for a stand-alone VB script, but fails when used in aWE
context because the path to the file to be included seems to depend on where
you are at the time.  Is there a WE or VB Script property that points to the
path of the calling file?  If so, this could be concatinated to the front of
the file specified in the argument to the include routine and all would be
well.

Best wishes.

Tim Burgess
Raised Bar Ltd
PO Box 4442
Atherstone
Warwickshire
CV9 9AT

Phone:  +44 (0)1827 719822
Email:  [EMAIL PROTECTED]
Web:  http://www.raisedbar.net

Don't forget to vote for improved access to music and music technology at

http://www.raisedbar.net/petition.htm
 

Reply via email to