Jump to content

Selecting text?


Go to solution Solved by JLogan3o13,

Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators
  • Solution

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")

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...