How to set input focus only on that control which is editable or not read only?
Posted: 19 Apr 2017, 12:29
Friends I want that when I press f1 key then it should set input focus on the control which is editable or not read only. for example please look at this image-
In the above image you can see that I used ranorexspy tool to get the information of current window’s controls and it is showing that the state of the current control is focusable and currently it is focused.
Now please look at this image-
In this image you can see that the state of this control is unavailable and it is read only.
I know I can use winget command to get the list of all controls of the active window and then I can use a parsing loop to get specific control and then controlsetfocus can be used to set input focus on the specific control. Moreover, control’s ClassNN or Control ID can be retrieved by control’s position and the width and the height of the control but all these methods does not specify which control of the active window is focusable or not read only.
Can anybody help me to solve this issue?
Thanks a lot....
In the above image you can see that I used ranorexspy tool to get the information of current window’s controls and it is showing that the state of the current control is focusable and currently it is focused.
Now please look at this image-
In this image you can see that the state of this control is unavailable and it is read only.
I know I can use winget command to get the list of all controls of the active window and then I can use a parsing loop to get specific control and then controlsetfocus can be used to set input focus on the specific control. Moreover, control’s ClassNN or Control ID can be retrieved by control’s position and the width and the height of the control but all these methods does not specify which control of the active window is focusable or not read only.
Can anybody help me to solve this issue?
Thanks a lot....