I have a third-party application and I need to read the values of some controls to use them in my own application developed in Delphi. The other application runs on Windows and is obviously written in Java using the SWT framework. Unfortunately the (control) IDs of the controls where I need to read the values are different everytime I start the third-party application. It seems that the Java/SWT framework generates new windows/control IDs each time the UI of the application is created. Is there any other identifier I could use?
Share
You can use the Windows properties to get an ID which is persistent.
The name of the property is SWT_OBJECT_INDEX:
The return value of GetProp() is the ID of the window. Handle is the handle to your control. However, you need to go through all child windows to find the control with the ID you are looking for. Please note that those IDs could change if the application is updated.