pythoncom InternetExplorer.Application don't work in vista || firefoxpythoncom ?

G

gcmartijn

H!

I using a script that opens a internet page in a small window (what I
can control)
In XP everything was working fine, but now I'm using Vista with IE7
and this is what happends now:

First a small window opens at the postion x0 y0 (like I want) but then
IE thinks "Hey lets open a other main window too".
And that window opens the url 'http://www.google.nl'

It seems that I can't control/use my first window anymore, and that
IE7/vista is forcing to open it in a big new window.

The code below is what I'm using.

def webbrowser(url=None):
import pythoncom
from win32com.client import Dispatch

ie = pythoncom.CoCreateInstance("InternetExplorer.Application",
None,pythoncom.CLSCTX_SERVER,pythoncom.IID_IDispatch)
ie = Dispatch(ie)
ie.Top = 0.0
ie.Left = 0.0
ie.Height = 400
ie.Width = 400
ie.AddressBar = False
ie.MenuBar = False
ie.Resizable = False
ie.StatusBar = False
ie.ToolBar = False
ie.Visible = 1
return ie

w = webbrowser()
w.Navigate('http://www.google.nl')
 
M

Méta-MCI \(MVP\)

Hi!

Your code run OK for me (Vista Ultimate).
This other version run also OK :

def webbrowser(url=None):
import win32com.client, time

ie=win32com.client.Dispatch('InternetExplorer.Application')
while ie.Busy==True:
time.sleep(0.125)
ie.Top = 0
ie.Left = 0
ie.Height = 400
ie.Width = 400
ie.AddressBar = False
ie.MenuBar = False
ie.Resizable = False
ie.StatusBar = False
ie.ToolBar = False
ie.Visible = 1
return ie

w = webbrowser()
w.Navigate('http://www.google.nl')





@-salutations
 
T

Terry Reedy

H!

I using a script that opens a internet page in a small window (what I
can control)
In XP everything was working fine, but now I'm using Vista with IE7
and this is what happends now:

First a small window opens at the postion x0 y0 (like I want) but then
IE thinks "Hey lets open a other main window too".
And that window opens the url 'http://www.google.nl'

Perhaps on XP you changed the IE homepage to about:blank. On your Vista
machine, it is set to Google, perhaps by the manufacturer (for a fee).
Try changing it.
 
G

gcmartijn

Perhaps on XP you changed the IE homepage to about:blank.  On your Vista
machine, it is set to Google, perhaps by the manufacturer (for a fee).
Try changing it.

Nope when its about:blank I get that google page (because I say that
in the script)
 
G

gcmartijn

Hi!

Your code run OK for me (Vista Ultimate).
This other version run also OK :

def webbrowser(url=None):
    import win32com.client, time

    ie=win32com.client.Dispatch('InternetExplorer.Application')    
    while ie.Busy==True:
        time.sleep(0.125)
    ie.Top = 0
    ie.Left = 0
    ie.Height = 400
    ie.Width = 400
    ie.AddressBar = False
    ie.MenuBar  = False
    ie.Resizable = False
    ie.StatusBar = False
    ie.ToolBar = False
    ie.Visible = 1
    return ie

w = webbrowser()
w.Navigate('http://www.google.nl')

@-salutations

I use your script now but I'm still getting 2 windows I uploaded a
screenshot how it looks.
1 at the background my window (but that is loading nothing)
1 at on top with the site http://www.google.nl (because that is in the
script)

http://img376.imageshack.us/img376/5506/capturess8.jpg
 
M

Méta-MCI \(MVP\)

Hmmmm... I have a similary problem, in another circumstances.
It's often a problem of configuration of IE (for news customers). But,
it is not easy, because IE has many parameters.

Good luck!

Michel Claveau
 
G

gcmartijn

Hmmmm...  I have a similary problem, in another circumstances.
It's often a problem of configuration of IE (for news customers).  But,
it is not easy, because IE has many parameters.

Good luck!

Michel Claveau

IE have many options, you say that the code is working so I was hoping
that you could answer these questions:
- Is your tabbed browsing on ?
- Do you use the default 'securiy' settings ?
- Do you use by privacy option: Medium ?
- The advanced options are to much to ask here :(

Greetings,
GCMartijn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top