if I understand WinSize2 correctly, it polls for new windows (at least this is what "Interval: check for new window titles" suggests).
An event-based approach should be way less resource-burden than polling every n msecs.
I don't know AHK that well, but I think it can act event-based as well: it provides an OnMessage() function (http://www.autohotkey.com/docs/commands/OnMessage.htm) and there is a WM_CREATE message (http://www.autohotkey.com/docs/misc/SendMessageList.htm).
As far as I understand it, something like OnMessage(WM_CREATE, handleNewWindow) should execute the handleNewWindow() every time a new window is created.
Thanks for your work & regards
Log in to post a comment.