I Ilya G. Active Member Licensed User Longtime User May 7, 2019 #1 Is it possible to get text in other app label?
Erel B4X founder Staff member Licensed User Longtime User May 8, 2019 #2 There is a low level accessibility API in Windows. However it is not something that you can access with B4J without quite a lot of complex work. Upvote 0
There is a low level accessibility API in Windows. However it is not something that you can access with B4J without quite a lot of complex work.
MarkusR Well-Known Member Licensed User Longtime User May 10, 2019 #3 article about interprocess communication https://www.researchgate.net/public..._with_Java_in_a_Microsoft_Windows_Environment https://en.wikipedia.org/wiki/Inter-process_communication Upvote 0
article about interprocess communication https://www.researchgate.net/public..._with_Java_in_a_Microsoft_Windows_Environment https://en.wikipedia.org/wiki/Inter-process_communication
M MathiasM Active Member Licensed User May 10, 2019 #4 MarkusR said: article about interprocess communication https://www.researchgate.net/public..._with_Java_in_a_Microsoft_Windows_Environment https://en.wikipedia.org/wiki/Inter-process_communication Click to expand... 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 said: article about interprocess communication https://www.researchgate.net/public..._with_Java_in_a_Microsoft_Windows_Environment https://en.wikipedia.org/wiki/Inter-process_communication Click to expand... 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.
MarkusR Well-Known Member Licensed User Longtime User May 10, 2019 #5 MathiasM said: That would only work if the other application actually implemented sharing the text, isn't it? Click to expand... 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: May 10, 2019 Upvote 0
MathiasM said: That would only work if the other application actually implemented sharing the text, isn't it? Click to expand... 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.