find position for active tab?
Moderators: Dorian (MJT support), JRL
find position for active tab?
When I press the tab few times, it goes to a certain button. How can I find the location for that button? thank you!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Does this work for you?
GetCaretPos>X,Y,Relative
GetCaretPos retrieves the X, Y coordinates of the text caret (text cursor) of the foreground window. The coordinates are returned in the variables provided. Set Relative to 0 to return absolute screen coordinates, or 1 to return coordinates relative to the window.
From Help. Not to be confused with Get Cursor (mouse position)
GetCaretPos>X,Y,Relative
GetCaretPos retrieves the X, Y coordinates of the text caret (text cursor) of the foreground window. The coordinates are returned in the variables provided. Set Relative to 0 to return absolute screen coordinates, or 1 to return coordinates relative to the window.
From Help. Not to be confused with Get Cursor (mouse position)
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
If this is for a screen with a static design, perhaps this approach might work.
Make an array with the tab count and the x/y values for that tab count. Count the number of tabs pressed, and get the x/y values for that tab from the static array. Could keep a running count up/down depending on use of Tab/SH-Tab, from the last position.
Make an array with the tab count and the x/y values for that tab count. Count the number of tabs pressed, and get the x/y values for that tab from the static array. Could keep a running count up/down depending on use of Tab/SH-Tab, from the last position.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!