Internet Explorer Winset command list

Get help with using AutoHotkey and its commands and hotkeys
sethjbr
Posts: 11
Joined: 14 Feb 2017, 16:39

Internet Explorer Winset command list

02 Mar 2017, 17:35

Greetings AutoHotkey community,

Where can I find a list of all the possible Winset commands? I found the commands to remove the window title bar, gray out the restore/maximize buttons, prevent resizing the window, remove the close button, and also remove the minimize button, but I haven't found the Winset command to remove the Internet Explorer toolbars and command bar on a new Internet Explorer window. Where can I find that?

Thanks in advance,

Seth
User avatar
boiler
Posts: 3320
Joined: 21 Dec 2014, 02:44

Re: Internet Explorer Winset command list

02 Mar 2017, 20:44

WinSet changes attributes and styles of a window. It seems you are looking to change what a program (IE) does within that window. WinSet doesn't change how a program operates (what it fills the window with).

As an example, WinSet can change an MS Word window to be semi-transparent (that's a window attribute), but it can't change it so the background of the text editing area is red (that's what MS Word does within the window).
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Winset command list

02 Mar 2017, 21:52

The commands you describe use standard techniques applicable to all windows. Hiding individual controls via 'Control, Hide/Show', the only relevant AutoHotkey command I can think of, may have undesirable side effects.

Here are some techniques that may achieve what you want. Unfortunately they toggle, rather than set, however, you may be able to loop through the controls via a control loop or via Acc.ahk, to determine if a bar is currently visible. Also, you could possibly get whether the menu items are ticked or not.

Tested on IE 11, Windows 7:

Code: Select all

q:: ;toggle hide/show Internet Explorer bars
;show:
;1091	&Find on this page...	Ctrl+F
;toggle:
;41511	&Menu bar
;41478	&Favorites bar
;41481	&Command bar
;41474	&Status bar

WinGet, hWnd, ID, ahk_class IEFrame
PostMessage, 0x111, 41511, 0, TabWindowClass1, ahk_id %hWnd% ;WM_COMMAND
PostMessage, 0x111, 41478, 0, TabWindowClass1, ahk_id %hWnd% ;WM_COMMAND
PostMessage, 0x111, 41481, 0, TabWindowClass1, ahk_id %hWnd% ;WM_COMMAND
PostMessage, 0x111, 41474, 0, TabWindowClass1, ahk_id %hWnd% ;WM_COMMAND

vNum := !vNum
if vNum
	PostMessage, 0x111, 1091, 0, TabWindowClass1, ahk_id %hWnd% ;WM_COMMAND
else
	JEE_IntExpFindBarHide(hWnd)
Return

JEE_IntExpFindBarHide(hWnd)
{
ControlGet, hCtl, Hwnd, , FindBarClass1, ahk_id %hWnd%
if ErrorLevel
	Return
;ToolbarWindow321 (the 1 is relative to FindBarClass, not IEFrame)
ControlClick, ToolbarWindow321, ahk_id %hCtl%
Return
}
Personally, I hid all the bars the first time I used IE, and never thought about them again, so I'm curious as to why you would want to regularly reset them. However, there was one exception, I do regularly use the Find bar, and wanted a reliable way to turn it on/off.

To get menu item IDs:
Get Info from Context Menu - Scripts and Functions - AutoHotkey Community
https://autohotkey.com/board/topic/1975 ... text-menu/

To get a menu item's ticked status:
Turn all scripts on and off - Page 2 - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/8928 ... ntry565650

[EDIT:]
A way to show the Find box via objects:
(Many menu item commands can be invoked via PostMessage or via ExecWB.)

Code: Select all

^f:: ;internet explorer/html help - show find box
WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)

;OLECMDID_FIND := 32
oWB.ExecWB(32, 0)
oWB := ""
Return
Last edited by jeeswg on 03 Mar 2017, 13:08, edited 2 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
sethjbr
Posts: 11
Joined: 14 Feb 2017, 16:39

Re: Internet Explorer Winset command list

03 Mar 2017, 11:04

Thank you very much jeeswg. That is very helpful. I will try that when I have a few spare moments. :)
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
GitHub: 4GForce

Re: Internet Explorer Winset command list

03 Mar 2017, 14:04

sethjbr wrote:Thank you very much jeeswg. That is very helpful. I will try that when I have a few spare moments. :)
You might also want to take a look at styles and exstyles ... https://msdn.microsoft.com/en-us/librar ... 00543.aspx

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], BushMange, CEA6597, LiangShuii, VACO BenQ, w0z and 191 guests