[
Lists Home |
Date Index |
Thread Index
]
- From: "Srinivasan, Veeraraghavan (AZ15)" <Veeraraghavan.Srinivasan@iac.honeywell.com>
- To: "'xml-dev@ic.ac.uk'" <xml-dev@ic.ac.uk>
- Date: Thu, 9 Dec 1999 14:36:40 -0700
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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|