I took the freedom to alter part of the Main of your code from the 1st post, Sammay. It still needs fine-tuning regarding the height of the filterbox, if you want to. Other than that it pops up nicely over the address bar, at least here with me. If AB is turned off it seems to at the moment pop up where the AB appeared last.
Code: Select all
Main:
;MsgToXY("::setlayout(showaddressbar=1);")
ControlGetPos, ABX, ABY, ABW, ABH, Edit16, ahk_id %XYhWnd%
SysGet, xborder, 32
SysGet, yborder, 33
SysGet, heightOfCaption, 4
SysGet, heightOfMenu, 15
guiX := "X" . (ABX - xborder)
guiY := "Y" . ((((ABY - yborder) - heightOfCaption) - heightOfMenu) - 3)
;ToolTip, X %ABX% Y %ABY% W %ABW% H %ABH% ;reported addressbar X/Y is confusing
Gui, +HwndGUIhWnd -Resize -Border -Caption +OwnDialogs +AlwaysOnTop
Gui, Margin, 0, 0 ; TODO remove background around editbox margin
Gui, Font, s8, Segoe UI ; should be DPI aware
GUI, Add, Checkbox, gUpdateFilter hWndGUIPausehWnd 0x8000 0xc00, P ;pause livemode for RegExp
Gui, Add, Edit, y1 gUpdateFilter hWndGUIEdithWnd R1, "" ;the all-important filterbox
DllCall("SetParent","UInt", GUIhWnd, "UInt", XYhWnd) ;child of XY
GuiControlGet, EditPos, Pos, %GUIEdithWnd%
GuiControl, Move, %GUIEdithWnd%, % "w" EditPosW*8
GuiControl, Move, %GUIPausehWnd%, % "h" EditPosH ;set same height as filterbox (to center-align)
Gui, Show, %guiX% %guiY% AutoSize
SendInput, {Right}{Left}
;^ place cursor inside default quotes (Edit is created last and focused)