I have an on active event, and I need the handle/window id for the window that becomes active. I've tried using $wid, but it seems that it always returns the ID for the Status Window. I've also tried $window($active).wid, but then, there is the same old problem: what if there are two windows named the same? Is there anyway of getting the wid/hwnd without having this problem?
Actually in this case, you can get all handles by looping through $window(<name>,N).hwnd, but in the case of on ACTIVE, you can't tell which of the instances returned by $window($active,N) is the one that was activated.