Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifically: DoDefaultAction (UIA_LegacylAccessiblePattern) #51

Open
tallnn opened this issue Mar 28, 2024 · 4 comments
Open

Specifically: DoDefaultAction (UIA_LegacylAccessiblePattern) #51

tallnn opened this issue Mar 28, 2024 · 4 comments

Comments

@tallnn
Copy link

tallnn commented Mar 28, 2024

Deer
I have recently encountered a problem that is different from the error reported last time. Could you please help me clarify this
Snipaste_2024-03-28_10-29-32
Thank you very much for your selfless help!

@Descolada
Copy link
Owner

When is the error happening? Are you able to provide steps so I could reproduce it?

@tallnn
Copy link
Author

tallnn commented Mar 28, 2024

Here is my main code. When I use click(), an error message will appear as shown in the image above. If I use highlight(), it can be displayed normally. I have also attached a screenshot of the desired control selected using UIAViewer. I look forward to your response

UIA := UIA_Interface()
SYEl := UIA.ElementFromHandle(" ahk_exe GSFramework.exe")
km :=SYEl.FindFirstBy("type=50020  and name=BS01902").click()

image

@Descolada
Copy link
Owner

@tallnn The element shown in the UIAViewer screenshot is a Text type element, and usually text cannot be clicked. It is a mistake that the LegacyIAccessible pattern is shown as available (it's a bug, but I don't know how to fix it because UIA itself reports LegacyIAccessible as being available...). If that element is indeed clickable (and not its parent for example) then you could try instead Element.ControlClick() or Element.Click("left").

@tallnn
Copy link
Author

tallnn commented Apr 1, 2024

thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants