Hide IE COM StatusBar

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Hide IE COM StatusBar

16 Aug 2017, 12:47

I'm making yet another web-based desktop client, and I was curious if the StatusBar could be hidden. The StatusBar is the tooltip-like notification that shows up on the bottom-[left/right] of the browsing window that shows URL's when you hover over links. Most browsers also show loading info there, not sure if IE does or not. I'd prefer it to not be a global effect, or at least something that can be changed back easily enough if it has to be. Preferably, it could be set to affect only the COM obj, either directly through the object, hwnd, or whatever ID it needs. IE_Object.StatusBar:=0 won't work, as explicitly stated by MSDN: "The WebBrowser object saves the value of this property, but otherwise ignores it." IE_Object.StatusText also isn't valid: "The WebBrowser object returns an error from this property." Based on that.. why is it even a property?

I'm also aware this use to be an option to set via JavaScript, but was removed due to security issues, which led to it's current implementation. I'm not trying to hide it per-page, but just in the whole browser, and just for the one window/parent process.

Anyone have any ideas or solutions?
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 14:27

I am sure i got statusbar to work in the past are you sure?
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:06

Quite sure. How long in the past was it? Because I do believe it did use to work, but then I think they removed it. I can't post the code due to the address being unavailable to you (local), but I can make an example.

Code: Select all

#singleInstance force
#persistent
#include *i <Lib_1>
#include <IEObj> ; https://github.com/Masonjar13/AHK-Library/blob/master/Lib/IEObj.ahk
url:="https://google.com"
setWinDelay,0,0

tooltip,Loading..
wb:=new IEObj
wb.init2()
gui,+hwndghwnd +resize
xhwnd:=wb.wb.hwnd
setParentByHwnd(xhwnd,ghwnd)
wb.wb.fullscreen:=1
wb.wb.statusBar:=0 ; <=
wb.navToUrl(url)
winMove,% "ahk_id " . xhwnd,,0,0,500,500
tooltip
wb.wb.visible:=1
gui,show,w500 h500
return

guiClose:
gui,cancel
exitApp

guiSize:
winMove,% "ahk_id " . xhwnd,,0,0,a_guiWidth,a_guiHeight
return


setParentByHwnd(child,parent){
    dllCall("SetParent","ptr",child,"ptr",parent)
}
I'm aware my class is a little messy.. I should really clean it up a bit.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:10

why wb.wb? that wouldnt work that way anyway?
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:13

It's how I have IEObj set up. this.wb is the actual COM object, therefore wb.wb is direct access to the object externally.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:13

I know absolutely nothing about IE and the myriad of COM-accessible interfaces it has, but apparently, if you show a webpage through Shell.Explorer, it doesn't do what you're talking about:

Code: Select all

Gui Add, ActiveX, w640 h480 vwb, Shell.Explorer
wb.Navigate("www.google.com")
Gui Show, w640 h480
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:20

That is true, it doesn't. But it also doesn't have a complete webkit, so many features (not sure which exactly) don't work. In this specific case, it doesn't work. Not sure which feature is being relied upon that isn't there, however, I don't believe it matters; I don't believe you can inject the missing features.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:22

Still works in windows 10
wait are you doing this in IE or a gui?
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:23

then why isnt navigate wb.wb
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:35

It is, kind of. I don't directly reference the navigation, I built a method for navigating and waiting for it to finish loading.

It's an instance of IE that's parented by a GUI.

What version is IE on W10? I'm working with 11.0.9600.18697.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:38

Masonjar13 wrote:That is true, it doesn't. But it also doesn't have a complete webkit, so many features (not sure which exactly) don't work. In this specific case, it doesn't work. Not sure which feature is being relied upon that isn't there, however, I don't believe it matters; I don't believe you can inject the missing features.
From what I recall reading from posts in the past, you're meant to add some stuff for the full functionality: https://autohotkey.com/boards/viewtopic ... 409#p67409
But I do have to say that with your way, IE obeys its protected mode setting: IE itself scares me. IE without even the basic protections it has me shivering. Anyway.

The only way I found to do what you were asking for was to close all windows of ahk_class tooltips_class32 inside the iexplore.exe instance your code starts up. (This is on Windows 10.) Not ideal, but judging from the text you quoted from MSDN, it seems Microsoft intentionally broke the ability to do it properly. But given my limited knowledge on this topic, the tooltips class hack is the best I can suggest, sorry. :(
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 15:40

11.483.15063.0
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 16:03

I don't see any updates for IE, so I'm going to assume I can't update to that version from W7. But you're saying that simply setting StatusBar:=0 works for you?

@qwerty12, well I'll be.. The closure of the class windows didn't work, but I grabbed FixIE() from that thread, works like a charm! Quite better, in fact, than anything else I've been doing. Based on how these clients work, protection isn't something I'm concerned about.

But, are add-ons loaded? Or, can they be loaded in manually? This is quite important for most of my clients.

Edit: tested, and they certainly don't load by default.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 16:33

well i use the word FALSE but yea. directly setting it alters if the statusbar is visible. back when i did it before was all windows 7 devices so it should work fine.
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 16:35

Masonjar13 wrote:@qwerty12, well I'll be.. The closure of the class windows didn't work
Sorry, I didn't actually test doing that from AutoHotkey; rather, I just used Process Hacker's window thingy to do it. (Also, come to think of it, I think DetectHiddenWindows needs to be on.)
But, are add-ons loaded? Or, can they be loaded in manually? This is quite important for most of my clients.
With Shell.Explorer? Probably not, if this needs to be done to ensure scripts can be ran...

Though, I do know CWebView which uses SE, and does the same as Installer.ahk, does appear to load ActiveX plugins.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 16:53

@tank, not sure then. It's certainly not working on my machine.

@qwerty12, SE? I had to clean several errors, but it seems to be running now (CWebView, that is). Though.. How do I even use it? I don't see any documentation, and it's certainly not straight-forward. Specifically, I have Adblock Plus for IE, and I want that to run for the implementation.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 17:23

I was too lazy to type out "Shell.Explorer" again.

And as for how to use it:
qwerty12 wrote:I know absolutely nothing about IE
Best I got is:

Code: Select all

Gui, webHost: New
cwv := new CWebView("webHost", "w640 h480")
cwv.SetURL("www.google.com")
Gui, webHost: Show
And, no, I don't think BHOs load with CWebView.
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 18:10

qwerty12 wrote:And, no, I don't think BHOs load with CWebView.
Well, that was easy.

Code: Select all

Gui, webHost: New
cwv := new CWebView("webHost", "w640 h480")
try if ((BhoAbp := ComObjCreate("{FFCB3198-32F3-4E8B-9539-4324694ED664}", "{FC4801A3-2BA9-11CF-A229-00AA003D7352}"))) {
	DllCall(NumGet(NumGet(BhoAbp+0)+3*A_PtrSize), "Ptr", BhoAbp, "Ptr", ComObjValue(cwv.__Ptr))
	; For releasing, do the above DllCall again, but pass 0 as the second argument. And then ObjRelease(BhoAbp)
}
cwv.SetURL("http://www.addic7ed.com/")
Gui, webHost: Show
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Hide IE COM StatusBar

16 Aug 2017, 19:11

setting it directly works for me on Win10 with IE version 11.540.15063.0. Though, my statusbar appears to be hidden by default.

Code: Select all

ie := ComObjCreate("InternetExplorer.Application")
ie.visible := True
ie.navigate("www.google.com")
while ie.busy
    sleep 50
sleep, 3000
ie.statusbar := false
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Hide IE COM StatusBar

16 Aug 2017, 21:36

I came up with a kind of hybrid solution, I'll post it when I can actually write it (no time :/).
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Xtra and 146 guests