boolean values in COM / VB / Python
lloyd at venix.com
Tue Mar 27 02:42:30 CEST 2001
My guess is that you don't have a COM wrapper in place for the Document. In
ie = win32com.client.Dispatch("InternetExplorer.Application")
ie.Visible = 1 # toggles window visible
ie.Visible = 0 # toggles window invisible
ie.GetHome() # loads the home page
Now when you refer to
you are actually referring to a new object. I believe that you will need to do
some work to provide the wrapper so that Python values get translated to the
equivalent COM values.
"John J. Lee" wrote:
> ie.Document.execCommand("SaveAs", false, pathname)
> where ie is an Internet Explorer object, pops up a dialogue box, no matter
> what value for false I try, from (1==0, 0, "0", None). According to the MS
> docs at
> this isn't supposed to happen, because when the second argument to
> execCommand is 'false', the command 'Does not display a user interface'.
> According to Mark Hammond just last month, 0 should do fine as a way of
> representing 'false':
> Any clues as to what is happening?
> Tips on the differences between C++ / VB and Python in general would also
> be appreciated -- presumably there must be some reliable and mechanical
> way of doing this?
1 Court Street, Suite 378
Lebanon, NH 03766-1358
More information about the Python-list