silent saveas ?

John J. Lee jjl at pobox.com
Sat Nov 1 18:33:30 EST 2003


"Robert Brewer" <fumanchu at amor.org> writes:

> So you want your program to behave just like a Trojan horse, is that
> right?
[...]

Eh?  Perhaps I'm too innocent to see how an automate-able SaveAs
command is necessary or even particularly useful in writing a trojan,
but it sounds to me like he just wants to write some kind of
functional testing or scraping thing.

Tom, first of all, you appear to be writing in VB (Visual Basic) and
this newsgroup is for discussion of a different language (Python).
AFAIK the answer to your question is (for IE 5, anyway, never tried
5.5 or 6), IE is just broken this way: it'll pop up a dialog no matter
what.

For some objects, you can just ask them to save themselves (I forget
the details, but it's standard COM stuff IIRC), but for others
(images, IIRC), there seems to be no way short of digging around in
the wininet cache or using wininet directly, either of which, in the
general case, can be a major bore.  I think there's an example
somewhere in the MS docs that shows how to save HTML source, at least.


John




More information about the Python-list mailing list