Hi majkinetor,
maybe I have don't understand how your script work, but here is my question. For illustration purpose, I will use the script wrote by doyle on the previous page :
Code:
#Persistent
SetBatchLines, -1
Process, Priority,, High
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return
ShellMessage( wParam,lParam ) {
Global
If ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1
{
WinGetClass, class, ahk_id %lParam%
;MsgBox, %class%
If ( class = "Notepad" )
{
Dock_HostID := WinExist("ahk_id " . lParam)
;MsgBox, %Dock_HostID%
Gui, 5: Margin, 0, 0
Gui, 5: +LastFound +ToolWindow -Caption
Gui, 5: Add, Text,, just some text here
Gui, 5: Show, x200 y200
;Gui +LastFound +ToolWindow -Caption
; Gui, 1:Show, w1000 h28, Test
c1 := WinExist()
Dock(c1, "x(0,0,0) y(0,0,48) t")
}
}
}
#include Dock.ahk
Esc::
exitapp
return
So when the script is running and you open a notepad windows, it create a new gui which should be dock to the notepad window just opened. But as you can see if you try this script, when the notepad window is moved, the gui don't follow.
Is there a problem on the ahk script ?
Edit : in addition, the documentation says :
Quote:
Using dock module you can glue your or third-party windows to any top level window.
Is it possible with your Dock.ahk script to glue a ahk windows on a third-party windows ?