Jump to content
Sign in to follow this  
Sori

Selecting text?

Recommended Posts

Sori

I'm surprised I'm having such a hard time finding this information...

I'm simply wondering how you would select/highlight text from a pre-defined string.

For example:

"Sally went to the store."

selectText("went to")

and it would highlight it, as if someone clicked and dragged their mouse.

 


If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post


Link to post
Share on other sites
JLogan3o13

Sori, you have enough posts here to realize that is nowhere near enough information. Where is the text that is being selected (web page, inputbox, word document, etc.)? How you obtain the string goes a long way in determining how you can manipulate it.

How about posting your code, as well as a more defined explanation of what you're trying to do, rather than asking us to guess ;)

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Sori

I don't have any specific code to what I'm trying to do, yet.

The where is a bit difficult, because it's part of a SAPI based application, so I need the ability to select the text regardless of where it is.

I was thinking of doing something like a looped search to find the specified text.

For now, let's say that the text is in a notepad window, and I'll see what I can do from there.


If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post


Link to post
Share on other sites
JLogan3o13

You could use ControlGetText to get the text of a Notepad document. You would then have to decide how you want to parse through it.

ControlGetText("[CLASS:Notepad]", "", "Edit1")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Sori

I was hoping for some extra laziness, but I guess paragraph code will have to do xD

Thank you


If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post


Link to post
Share on other sites
JLogan3o13

The help you receive is directly proportional to the amount of information you supply :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.