Sign in to follow this  
Followers 0
Lord Maim

IECreate window without toolbar?

10 posts in this topic

Using IECreate, is it possible to open an IE window that does not have the toolbar, file menu, links etc. at the top of the normal window, and just have an empty frame?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Yes, just embed the object

see _IECreateEmbedded ( )

or

see GUICtrlCreateObj()

in help

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

as well there are several attributes you can control with _IEPropertySet

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Valuater: Actually I did read the helpfile regarding those commands, and they aren't applicable in this case. Perhaps I wasn't clear previously, but unfortunately I'm manipulating a web application and not a GUI. Creating an embedded window in this fashion will remove a number of the attributes necessary to my script.

The web application generates child windows in frames without a menu, tool, links, or address bar, which my script can query directly, but the windows that are generated with _IECreate have all the clutter that get in the way of your view.

Dale: Well that got me halfway there. With _IEPropertySet I can remove the menubar and the address bar. I'll just have to generate the window as hidden until they are removed, then set the window as visible afterward. However, I still need a way to remove the "standard buttons" and links menus. Any suggestions?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Clutter? There's only as much clutter as you yourself create:

#include <GUIConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
$style = $WS_MAXIMIZEBOX+$WS_MINIMIZEBOX+$WS_SIZEBOX
$exStyle = $WS_EX_TOOLWINDOW+$WS_CLIPCHILDREN
GUICreate("thinIE", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $style, $exStyle)
GUISetState()
$size = WinGetClientSize("")
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $size[0], $size[1])
GUICtrlSetResizing ( -1, $GUI_DOCKAUTO )
GUISetState()
_IENavigate ($oIE, "http://www.google.com")
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd
GUIDelete()
Exit

Edited by lod3n

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites

Clutter? There's only as much clutter as you yourself create=

lod3n: What I said was that the windows that are generated with _IECreate have all the clutter that get in the way of your view. Your example doesn't use that particular command at all. Instead, you use the _IECreateEmbedded command which, as I said before, will remove a number of the attributes of the embedded window that are necessary to my script. What you have works, just not for the web application I'm writing the script for.

But if you or anyone else know of another method using _IEPropertySet or something similar to manipulate an existing window, a way to trick _IECreate into creating a window of a specific configuration, or something else I've not heard of I would appreciate the help.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Oh. My bad, sorry. You're looking for something more like this:

#include <IE.au3>
$oIE = _IECreate ("about:blank",0,0) ; creates an invisible instance of a regular browser window
$oIE.AddressBar = 0 ; turn off all four IE Bars - works on 3rd party bars too, mostly.
$oIE.MenuBar = 0
$oIE.StatusBar = 0
$oIE.ToolBar = 0
$oIE.visible=1 ; unhides it, now that we've hidden what we don't want
_IENavigate($oIE,"http://www.google.com")
This was lifted from one of my previous posts:

http://www.autoitscript.com/forum/index.php?showtopic=32804

This essentially makes IE look like my previous post, so it's overkill for your needs. I don't know what your exact needs are though, so just comment things out until you get what you want.

Edited by lod3n

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

This essentially makes IE look like my previous post, so it's overkill for your needs. I don't know what your exact needs are though, so just comment things out until you get what you want.

lod3n: Excellent! That is exactly what I need, in the way I need it. Thanks very much! I've only been working with AutoIT for about a month, so my code is continually evolving. I've seen those sort of extensions (such as $oIE.addressbar) used in other code, and even used them myself in a "black box" kind of way. What are they called, and do you happen to have a link to something I could read up on? I think I'm missing out on some powerful tools.

Edited by Lord Maim

Share this post


Link to post
Share on other sites

Try running _IE_Introduction() -- it will give you pointers to MSDN documentation.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Thanks Dale!

Share this post


Link to post
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
Sign in to follow this  
Followers 0