Skip to content

Gets the user selected text ? #5624

Answered by FabianLars
zsio asked this question in Q&A
Nov 14, 2022 · 3 comments · 10 replies
Discussion options

You must be logged in to vote

How to get user selected text in other app?

I don't think that this is possible at all. At least not if you don't target a specific app where you have access to stuff like this.

Apps and gui frameworks generally draw this themselves without necessarily telling the OS that text is selected or providing an API that other apps can call to get selected text.

The only thing that could be possible is to take a screenshot of the display and analyze that - this will very likely be really difficult, with many false detections.

In other words: Not possible.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@FabianLars
Comment options

@zsio
Comment options

@jackeydou
Comment options

@zsio
Comment options

@geekyayush
Comment options

Answer selected by zsio
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants