[Tutor] Small issue with opening a new window with the Dispatch event in Win32 Python.
Ray Leyva
Ray Leyva" <rayleyva@esystemssolutions.com
Mon, 6 Aug 2001 12:30:30 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_001F_01C11E73.9451B6A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
To All,
I'm trying to write a small automation tool for the IE COM object. =
Using Dispatch in Win32. Here's a snippet.
.... snip ....
from win32com.client import Dispatch
... snip ....
def openbrowser(self):
self.ie =3D Dispatch("InternetExplorer.Application")
self.ie.Visible=3D1
.... snip ....
Whenever I run this code it will automatically take control of whatever =
explorer interface is already running, including but not limited to any =
'Windows Explorer' file browsers currently open ( It will only take =
control of one of these windows ). I was wondering if there is a way to =
issue a Dispatch command to force it to open in a new window.
I appreciate any and all help, and will respond with any clarifications =
that are needed. I'm hoping to submit this as a cookbook recipe if I =
can ever get a few of these niggling little issues out of the way.
TIA
Ray
------=_NextPart_000_001F_01C11E73.9451B6A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4616.200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>To All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm trying to write a small automation =
tool for the=20
IE COM object. Using Dispatch in Win32. Here's a=20
snippet.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>.... snip ....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>from win32com.client import=20
Dispatch<BR></FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>... snip ....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> def=20
openbrowser(self):<BR> self.ie =
=3D=20
Dispatch("InternetExplorer.Application")<BR>  =
; =20
self.ie.Visible=3D1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>.... snip ....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Whenever I run this code it will =
automatically=20
take control of whatever explorer interface is already running, =
including but=20
not limited to any 'Windows Explorer' file browsers currently open ( It =
will=20
only take control of one of these windows ). I was wondering if =
there is a=20
way to issue a Dispatch command to force it to open in a new=20
window.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I appreciate any and all help, and will =
respond=20
with any clarifications that are needed. I'm hoping to submit this =
as=20
a cookbook recipe if I can ever get a few of these niggling little =
issues=20
out of the way.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Ray</FONT></DIV></BODY></HTML>
------=_NextPart_000_001F_01C11E73.9451B6A0--