We're looking for a reliable way to get the next and previous window
in Z order from a given window. It might sometimes also be useful
to get the first and last window in Z order at the given window's
tree level. The Windows API GetWindow() function allows this sort
of query, and there are WinAPI functions for next and prior window,
but I don't see a direct way to do it in Window-Eyes. I'm betting
I missed something obvious.
My two ideas are
' Given window, the one to start from ...
dim nextWindow, priorWindow
' Idea 1.
set nextWindow = window.control.next.window
set priorWindow = window.control.previous.window
' Idea 2.
dim windows : set windows = window.parent.directChildren
dim i
for i = 1 to windows.count
if windows(i).handle = window.handle then
set nextWindow = windows(i+1)
set priorWindow = windows(i-1)
end if
next
Plus error checking of course.
But I don't know if control.next/previous or directChildren sort by Z
order, so I'm not sure if one approach is more accurate than the other.
I'm also assuming that window.control is always valid for all Window
objects here.
Is there a better way of doing this, and if not, is the
window.control.next/previous.window method the preferred way of doing it?
--
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:[email protected] http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller