Jump to content

Help with URL showing in IE window when toolbar set to False


Go to solution Solved by jguinch,

Recommended Posts

I am trying to write a script to open a webpage in IE in a fairly small window.  I want the IE window to be as uncluttered as possible with little/no room for the user to naviagate away from the page.

Whenever I use _IEPropertySet to set the toolbar to False, it places the URL before the document title of the page.  I don't want the URL in the title, just the actual title.  I am assuming this is an IE thing, but has anyone found a way to overcome this behavior? This script will interact with another web app, and that app only runs on IE8, so that is what I have been testing with.

#include <IE.au3>

_IEErrorNotify(True)

Opt("WinTitleMatchMode", 1)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Noca
    $oIE = _IECreate ("about:blank",0,0)
    _IEPropertySet ($oIE, "addressbar", False)
    _IEPropertySet ($oIE, "menubar", False)
    _IEPropertySet ($oIE, "statusbar", False)
    _IEPropertySet ($oIE, "toolbar", False) ; Setting this to TRUE removes the URL from the title bar
    _IEPropertySet ($oIE, "height", 332)
    _IEPropertySet ($oIE, "width", 450)
    _IENavigate($oIE,"http://www.google.com",1)
    $oIE.visible = 1

I appreciate any ideas.

Link to comment
Share on other sites

  • 2 weeks later...

#include <IE.au3>

_IEErrorNotify(True)

Opt("WinTitleMatchMode", 1)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Noca
    $oIE = _IECreate ("about:blank",0,0)
    _IEPropertySet ($oIE, "addressbar", False)
    _IEPropertySet ($oIE, "menubar", False)
    _IEPropertySet ($oIE, "statusbar", False)
    _IEPropertySet ($oIE, "toolbar", False) ; Setting this to TRUE removes the URL from the title bar
    _IEPropertySet ($oIE, "height", 332)
    _IEPropertySet ($oIE, "width", 450)
    _IENavigate($oIE,"http://www.google.com",1)
    $hwnd = _IEPropertyGet($oIE, "hwnd")
    WinSetTitle($hwnd, "", "My Google")
    $oIE.visible = 1

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Thank you both for replying. 

@jguinch, I have not tried using IECreateEmbedded.  I am GUI phobic I guess, but worst-case I will sit down and see if I can figure it out.

@JohnOne, I really liked your first suggestion and I thought it was going to save my neck.  But if I interact with the page at all, as in delete a message and reload the same page, the URL pops right back up again.

"kiosk mode set to child of gui" is going over my head..  I know IE has a kiosk mode, but that opens full screen, so it's more the child of gui part I don't get.  If you're willing to explain a little further you certainly have my attention.

Thanks again.

Link to comment
Share on other sites

Thanks again for the followup.  A user will be interacting with the webpage, so I wouldn't know exactly when to reset the WInSetTitle.  I did have some time to sit down today with creating a basic GUI frame and then using IECreateEmbedded to fill the GUI with my webpage.  Not as hairy as I was making it out to be.  I think that IECreateEmbedded will work just fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...