I can capture text from UI controls (button/Editbox/Checkbox etc) in Java Applications, using Java Access Bridge events. How can I:
- Set text in a Editbox
- Click on a button
using Java Access Bridge API calls?
I can capture text from UI controls (button/Editbox/Checkbox etc) in Java Applications, using Java Access Bridge events. How can I:
using Java Access Bridge API calls?
I would subclass the AccessibleContext of your GUI component and provide it with an accessibleAction object. Make AccessibleContext.getAccessibleAction() return your object.
If it's not null, it gives the screen reader a list of supported actions, that can be invoked - by the screen reader - by calling doAction on it.
Here is how I have done it for my project. Create a base class API that calls all PInvokes into JAB WindowsAccessBridge DLL. Make sure you target proper DLL Name if you are on 64 bit os. Use getAccessibleContextFromHWND function to get VmID and Context from Windows Handle. Locate the textbox or button within the Java Window by enumerating children. Once you locate the Control you are looking for in you case TextBox or Button perform the action.
1) Set text
2) Click on a button
Core...