> One small problem with the download object: I'm running WXP SP2. I read
> the instructions for Download.vbs and changed the path for the log file but
> did not change the path for the downloads to be stored in. The path
> specified did not exist. The script does not save the downloaded files if
> the path does not exist, but reports in the log: Write file xxx.yyy to
> disk - error code: 0. After fixing the destination path string, the files
> were saved and I get the same 'Write file ... error code: 0' message. It
> seems to me that the WriteTextFile method should return something different
> depending on whether the save was successful or not Thanks. That's an oversight that I should fix. It checks
to make sure that there's actually data to be written, but
it doesn't check the path, assuming that the parent folder
path is valid. I should probably rewrite it to test for the
folder path and confirm that no other problems occurred.
As you say, it doesn't make sense to return 0 if the write
failed.
I'm also open to any suggestions if people have
functionality requests. I'm not sure that component
is done. When I decided to write a component that
can do IP -> host name resolution I decided that it
would make sense to put all winsock/internet functions
into one library, so I combined it with basic file downloading
functionality that I had originally written for collecting
RSS feeds. I've also been toying with providing
ZLib compress/uncompress functions, for decompressing
ZLib-ed webpages. ZLib functionality could also be used
to decompress compressed Flash files. (I've been toying
with that for my own purposes, researching the possibilities
of finding a way to automate the downloading of .FLV
files rather than being forced to enable script and stream
them... to achieve everywhere what the Firefox Download
Helper extension does for YouTube.) But I'm not sure that
either of those ZLib abilities would be of much use to most
people -- enough so to justify adding more size to the
component.
Also, for anyone who's interested, I generally don't like
to release the source code of components as a whole,
complete project, lest people who don't know any better
decide to recompile, creating incompatible copies of the
same DLL. But the basic functionality in the jsHTTP
component is available on the VB code page as VB6 source
code.