[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

VBScript error

  • From: "Srinivasan, Veeraraghavan (AZ15)" <Veeraraghavan.Srinivasan@i...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Thu, 9 Dec 1999 14:36:40 -0700

vbscript error
Hi all,
	I know this is off-topic. I am using Microsoft Script control to
execute VB and Java scripts. This is to provide programmatic interface to
execute scripts in application programs. 

	When I load the following script using AddCode method (method on
script control) in Java (VJ++ environment), I get an error that says
"Expected end of statement". When I investigated into the cause of the
error, I figured out that the line having "CreateObject" is causing the
problem. When I removed the line, i did not get any errors/exceptions. Also,
I observed that when I use createObject method inside a Subroutine I do not
get any errors/exceptions. Does anybody have any idea on what I'm missing or
point to appropriate resources (Is there a mailing list for Microsoft Script
control?).

Environment : Windows NT 4.0 SP5, IE 5.0 , VJ++ 6.0

Code snippet:
function getNames(folder,subfolders)
			set fso = CreateObject("Scripting.FileSystemObject")
			set fld = fso.GetFolder(folder)

			i = 0
			if subfolders then
				ReDim filenames(fld.subfolders.count-1,1)
				for each f in fld.subfolders
					filenames(i,0) = f.name
					filenames(i,1) = f.datecreated
					i = i + 1
				next
			else
				ReDim filenames(fld.files.count-1,1)
				i = 0
				for each f in fld.files
					filenames(i,0) = f.name
					filenames(i,1) = f.size
					i = i + 1
				next
			end if
			getNames = filenames
end function


              Honeywell
Veeraraghavan Srinivasan
Senior Principal Engineer
Honeywell Hi-Spec Solutions
1280, Kemper Meadow Drive,
Cincinnati, OH 45240
Phone: (513) 595-8913




xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.