Using the WindowDestroyedEvent is tricky because all the information about the
window can be gone by the time the event fires. I rarely use that event for
this reason; and when I do, I also usually cache window handles from
elsewhere so I can recognize when the window that's going away is one I was
watching for. An overly simple example:
globals collection gMyWindows
void function WindowCreatedEvent(handle hwnd, ...)
if getWindowClass(hwnd) == "blah"
if !gMyWindows
gMyWindows = new collection
endIf
gMyWindows[intToString(hwnd)] = 1
endIf
windowCreatedEvent(hwnd, ...)
endFunction
void function WindowDestroyedEvent(handle hwnd)
if gMyWindows[intToString(hwnd)]
collectionRemoveItem(gMyWindows, intToString(hwnd))
sayString("There goes one!")
endIf
windowDestroyedEvent(hwnd)
endFunction
On Wed, Feb 22, 2017 at 06:13:20PM +0000, Sean Farrow wrote:
Hi,
I'm having to use WindowDestroyedEvent to perform some logic, but am getting an
invalid window hasndle when I try and get the class. Does anyone know whythis
is happening and whether there are any work arounds?
Cheers
Sean.
__________???
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts
--
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:Doug.Lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts