Just to confirm - this method works very nicely. 

Best wishes.

Tim Burgess
Raised Bar Ltd
Phone:  +44 (0)1827 719822

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

http://www.raisedbar.net/petition.htm
 
-----Original Message-----
From: Tim Burgess [mailto:[EMAIL PROTECTED] 
Sent: 09 September 2008 14:05
To: [email protected]
Subject: RE: Includes again

Great - thanks. 


Best wishes.

Tim Burgess
Raised Bar Ltd
Phone:  +44 (0)1827 719822

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

http://www.raisedbar.net/petition.htm
 
-----Original Message-----
From: Doug Geoffray [mailto:[EMAIL PROTECTED]
Sent: 09 September 2008 13:17
To: [email protected]
Subject: Re: Includes again

Tim,

Sure, just use ClientInformation.ScriptPath.  This gives the path of the
calling script.

Regards,
Doug

Tim Burgess wrote:
> 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
>  
>
>   

--
Doug Geoffray
GW Micro, Inc.
Voice 260-489-3671
Fax 260-489-2608
http://www.gwmicro.com



Reply via email to