[jawsscripts] Re: Getting window paths.

  • From: "Snowman" <snowman@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 7 Dec 2017 14:25:09 -0600

Whatever is unique about that window will do the trick.  Sometimes, it is 
the name, sometimes, the controlId.  Often any more, controlID isn't unique, 
and you end up looking at window name, or gfor text in the window.
My guess is taht the position in the tree will vary, depending on the order 
in which things get done.
But, if not.  If You can count on the position in the tree, then you can go 
hunting through ghe tree, comparing handles.  Just make sure the handle 
value you are looking for is not a constant, but is learned from this 
session in the program, since those are very dynamic.  But, once a window is 
created, and before it is destroyed, it's handle will remain constant.




+--------------------------------------------------------------------------+
Listen to The Snowman on MushroomFM.com, Saturday evenings, 8PM Eastern 
time.
60's and 70's tunes, and gently conservative talk.

----- Original Message ----- 
From: "Steve Spamer" <stevespamer68@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, December 07, 2017 1:03 PM
Subject: [jawsscripts] Re: Getting window paths.


Thanks Jim.  Ok, so it's not unusual for this tree to be dynamic.  So, I
guess the only way I can identify window 1 from window 2 is by
GetWindowName?
in some circumstances, I can always be sure that the window I'm currently in
is the top level window.
What I can't currently do, is varrify that window for further script.
So, that top level window could be audio set up, audio devices or playback,
etc etc etc, all which have different handles.
I have to have a function called "IsAudioSetUp ()", in order to do more
things within this window.
Currently I'm using string comparisons, but wondered if there was another
way.
Steve.


-----Original Message----- 
From: Snowman
Sent: Thursday, December 7, 2017 5:38 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Getting window paths.

Yeah,  not quite sure I am on target here.  but, with most programs, the
tree is very dynamic.  Sounds like that is true with yours.  Sometimes, the
tree stays static, and a windows position in the tree  can be relied upon,
but, I would say usually not.

But, if you know a handle value, you can search the tree for that handle.  I
don't know why you would do that.  but, it will work.




+--------------------------------------------------------------------------+
Listen to The Snowman on MushroomFM.com, Saturday evenings, 8PM Eastern
time.
60's and 70's tunes, and gently conservative talk.

----- Original Message ----- 
From: "Steve Spamer" <stevespamer68@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, December 07, 2017 11:13 AM
Subject: [jawsscripts] Getting window paths.


Hi folks. I can navigate a tree of windows, but some windows always stay
within the tree, even if they have been closed in the program.
Instead of getting the window name, I want to use the handle of the current
window and check it against the handle of windows displayed in the window
tree, but as this position is not constant when looking with the BX tools, I
would like to try with some of the functions referenced in the tools.
I have been told, if a particular window is always at a given level, then I
can check the handle from the currently focused window against the window at
that known level, and know itâ?Ts that particular window, hence being able
to have it as a location for further scripts.

So, at the moment, Iâ?Tm having to get the window name first and then check
it against what window is in focus. Has anyone got any suggestions/examples
on how I can identify windows without using the get window name function?

An example would be:
Window 1 is in focus in the program.
Window 1 is showing in the windows tree and it is 10 children back from the
top level window.
If I open another window and close it, that window will stay in the windows
tree and window 1 could now be 11 children back from the top level.
So, thatâ?Ts why Iâ?Tm searching for Windows 1 in the tree with the get
window name function,as the position doesnâ?Tt seem to be constant.
Thatâ?Ts why I would think the BX tools will give constant positions for
these windows.
I could varrify the focused window is the same as Windows 1 in the tree with
the handle, but I wouldnâ?Tt be able to determine that this window is called
â?oWindows1â?, so I can use it for further script.

I hope you understand what is a pain to explain <grin. THx steve.
Follow me on Twitter: @stevesax123
Visit the samplitude Access website. Jaws scripts for pro recording with
Samplitude in Windows: www.samplitudeaccess.org.uk
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: