Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.
The issue with the "TextPatternRange.GetText()" UIAutomation method throwing an "AccessViolationException" on Windows 11 may be due to compatibility issues between the automation library you are using and the new operating system.
Here are a few steps you can try to resolve the issue:
- Update the Automation Library: Check if an updated version of the automation library you are using is available that is compatible with Windows 11 and install it.
- Use a Different Automation Library: If an updated version of the current automation library is not available or the issue persists after updating, consider switching to a different automation library that is compatible with Windows 11.
- Check for Windows 11 Compatibility: Check if the automation library you are using is compatible with Windows 11. If not, the vendor or developer may need to release a compatibility update.
It's also recommended to keep your operating system and software up to date to ensure compatibility and security.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.