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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gcmartijn@gmail.com

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

    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.CoCre ateInstance("In ternetExplorer. Application",
    None,pythoncom. CLSCTX_SERVER,p ythoncom.IID_ID ispatch)
    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('htt p://www.google.nl')

    --
    ow and why can't I find a pythoncom.CoCre ateInstance.Fir eFox example ?

    Thanks for helping.
  • Méta-MCI \(MVP\)

    #2
    Re: pythoncom InternetExplore r.Application don't work in vista || firefox pythoncom ?

    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.cli ent.Dispatch('I nternetExplorer .Application')
    while ie.Busy==True:
    time.sleep(0.12 5)
    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('htt p://www.google.nl')





    @-salutations
    --
    Michel Claveau


    Comment

    • Terry Reedy

      #3
      Re: pythoncom InternetExplore r.Application don't work in vista ||firefox pythoncom ?



      gcmartijn@gmail .com wrote:
      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.

      Comment

      • gcmartijn@gmail.com

        #4
        Re: pythoncom InternetExplore r.Application don't work in vista ||firefox pythoncom ?

        On 5 jul, 15:27, Terry Reedy <tjre...@udel.e duwrote:
        gcmart...@gmail .com wrote:
        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.
        Nope when its about:blank I get that google page (because I say that
        in the script)

        Comment

        • gcmartijn@gmail.com

          #5
          Re: pythoncom InternetExplore r.Application don't work in vista ||firefox pythoncom ?

          On 5 jul, 14:14, "Méta-MCI \(MVP\)" <enleverlesX.X. ..@XmclaveauX.c om>
          wrote:
          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.cli ent.Dispatch('I nternetExplorer .Application')   
              while ie.Busy==True:
                  time.sleep(0.12 5)
              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('htt p://www.google.nl')
          >
          @-salutations
          --
          Michel Claveau
          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)


          Comment

          • Méta-MCI \(MVP\)

            #6
            Re: pythoncom InternetExplore r.Application don't work in vista || firefox pythoncom ?

            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

            Comment

            • gcmartijn@gmail.com

              #7
              Re: pythoncom InternetExplore r.Application don't work in vista ||firefox pythoncom ?

              On 6 jul, 16:00, "Méta-MCI \(MVP\)" <enleverlesX.X. ..@XmclaveauX.c om>
              wrote:
              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

              Comment

              Working...