Hi,
I've been wondering this for a long time.
To clear my head, just now I did some test, proved my way of using accviewer is wrong.
What I did to find path of a control:
Drag accviewer's "+" tool to the target window, so that there's a red rectangle surrounding the whole window;
Use "show acc structure" to find that control's path, with help of red rectangle indication of each step.
For example, the path is 4,3,4,4,4,3,4,2,
I use the following code to debug:
wt:="somewintitle"
WinActivate,%wt%
WinWaitActive,%wt%
msgbox % Acc_Get("Name", "4",0,%wt%)
The above turns out correct.
But if I use msgbox % Acc_Get("Name", "4,3",0,%wt%)
The message box will be empty.
And so on....
If, from the beginning, I drag accviewer's "+" tool to the next subframe to the whole window, then find the control's path....This method is also wrong, because IN SOME CASES the target control's "Accessible Info - Name" will be empty, while in other ways (start from whole window or directly pinpoint the target control) Name is good .
So, what's the correct way of doing it?
Appreciate any response.
what's the correct way of using AccViewer? Topic is solved
Re: what's the correct way of using AccViewer? Topic is solved
I haven't used Acc_Get much but on the library I have I see that the path delimiter is "."(Dot) instead of ","(Comma) .
Re: what's the correct way of using AccViewer?
My bad, "." works.
And you brought me luck, suddenly several Acc codes from this forum begin to work for me, without error any more.
Thanks so much!
Have a good day.