Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Re: Capturing HTML Errors

Reply
 
Old 01-07-2009   #1 (permalink)
Paul Randall


 
 

Re: Capturing HTML Errors


"mayayana" <mayaXXyana@xxxxxx> wrote in message
news:%23fTMplNcJHA.1704@xxxxxxThanks for the link and the free objects.

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. I haven't tested
whether the WriteBinaryFile method has the same behaviour.

-Paul Randall



My System SpecsSystem Spec
Old 01-07-2009   #2 (permalink)
mayayana


 
 

Re: Capturing HTML Errors

> One small problem with the download object: I'm running WXP SP2. I read
Quote:

> the instructions for Download.vbs and changed the path for the log file
but
Quote:

> 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
Quote:

> 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.



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: Capturing HTML Errors VB Script
working on html objects using HTML DOM, VBscript VB Script
Help with capturing please Vista music pictures video
vcr capturing Vista music pictures video
!!VISTA RC2!! Audio capturing while Video capturing Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46