B4J Question View in other app

MathiasM

Active Member
Licensed User

That would only work if the other application actually implemented sharing the text, isn't it?

If you really want to scrape text of labels owned by other processes that you don't control (i.e, you didn't write) Than you have to do some WinApi stuff.
Start here: https://stackoverflow.com/questions/352236/reading-from-a-text-field-in-another-applications-window for the right WinAPI commands, mainly you have to find the Handle of the other window via FindWindow, then get the Handle of the label., then use SendMessage with command 'WM_GETTEXT' to retrieve the text.
Using WinAPI in Java should be easiest via JNA (https://github.com/java-native-access/jna), here is a tutorial: https://www.javaworld.com/article/2077828/open-source-java-projects-java-native-access.html

This is not by any means a beginners task.

If you control both applications, just use a socket.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
That would only work if the other application actually implemented sharing the text, isn't it?
me thought we want share data between his apps.

in past it was possible to read text fields from other apps via win api, also password fields. but today i think its prevented my microsoft because misuse.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…