Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How could you highlight various parts of a text?


  • Please log in to reply
15 replies to this topic
Eedis
  • Members
  • 1775 posts
  • Last active: Aug 14 2015 06:33 PM
  • Joined: 12 Jun 2009
Does anyone know of any way you could possibly highlight various parts of some text with breaks in between the selection. For instance, when you're moving files, if you hold shift you can select files in a series. You click file 1, hold shift and click file 5 and it selects them all inbetween. But when you click file 1 and hold ctrl and click file 5, it only selects file 1 and 5, not the ones inbetween.

I was wondering if there was any possible way you could do this with text. Where you can drag highlight over some text, then hold ctrl and drag highlight over some other text without selecting the text inbetween. For instance.

"The quick brown fox jumps over the lazy dogs."

I drag highlight this portion, "The quick brown fox jumps over the lazy dogs."

Then I hold control and drag highlight this portion of the text, "The quick brown fox jumps over the lazy dogs."

So what it'd look like is this, "The quick brown fox jumps over the lazy dogs."

If I were to ctrl-c and copy and then ctrl-v to paste it, the results would look like this. "The quick brown the lazy dogs"

I've been wanting this feature for a while, just never really knew how to make it and never had the incentive to.

Thanks for any help :) Eedis
AutoHotkey state, the forum, Poly, and Drainx1. The short story.
I love my wife, my life, my atomic-match; for giving me the greatest gift a man could ask for, such a perfect and beautiful little girl.
9rjbjc.png

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
The selection capability that exists in W.E.. is not at all similar to the highlighting you are requesting.

What might be similar to your request is selecting parts of file names in W.E. which (of course) is not supported.

What specific program are you talking about?

Eedis
  • Members
  • 1775 posts
  • Last active: Aug 14 2015 06:33 PM
  • Joined: 12 Jun 2009
What? I'm not talking about any program, I'm talking about Windows.
AutoHotkey state, the forum, Poly, and Drainx1. The short story.
I love my wife, my life, my atomic-match; for giving me the greatest gift a man could ask for, such a perfect and beautiful little girl.
9rjbjc.png

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009

I was wondering if there was any possible way you could do this with text. Where you can drag highlight over some text, then hold ctrl and drag highlight over some other text without selecting the text inbetween.

In what program is the text being viewed?

Ace Coder
  • Members
  • 362 posts
  • Last active: Mar 13 2012 11:44 PM
  • Joined: 26 Oct 2009
Leef im sure he means notepad, scite, firefox, microsoft word and or anytime text is selectable. And Eed I like the idea... Im going to work on a way to go about this soon. Thanks for the idea. I will credit you with the idea. :)

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009

notepad, scite, firefox, microsoft word and or anytime text is selectable.

IMNOHO :wink:

word -- piece of cake
notepad -- No way!

firefox -- rewrite the webpage, painful, maybe doable

scite -- what ? Ohh, that -- have no Idea
Scintilla and SciTEAug 19, 2009 ... <!-- w -->www.scintilla.org<!-- w --> is the home of the Scintilla editing component and SciTE text editor application.

Ace Coder
  • Members
  • 362 posts
  • Last active: Mar 13 2012 11:44 PM
  • Joined: 26 Oct 2009
How did you reach those conclusions? It may help make this script. If im understanding correctly he wants what I have also wanted many times: the ability to select different portions of text at once. Im not sure how to accomplish this but its a nice project for me to do :)

  • Guests
  • Last active:
  • Joined: --
in firefox 3+, u can do multi-selection text by holding Ctrl

  • Guests
  • Last active:
  • Joined: --
ehmm, anyone know how to simulate a highlight text?
for example, in notepad when u do Ctrl+F a text, if found, it does highlight the text in file for u

Eedis
  • Members
  • 1775 posts
  • Last active: Aug 14 2015 06:33 PM
  • Joined: 12 Jun 2009
My idea was;
1. Possibly get the image of the text, there's many ways that it's doable, I've seen it done.
2. Then the script could tell what is text and what is not, possibly rule out anything that is not black, would only work for black text in that case.
3. Then it'd recolor the background of the text to blue to simulate a highlight.
4. Then it'd copy the selected text that is highlighted to clipboard.
5. Then paste the image on top of your desktop over the un-highlighted text, I've seen it done before, to simulate it being highlighted even though it actually is not.
6. Then when you highlight another portion of text, it'd repeat steps 1-5. But in replace to step 4, it'd just add that portion of the text to the end of the current string in the clipboard, or where ever else it was in the full text.

This is a pretty complex method that I can think of. But how much I'd hate to say it, it's way out of my league. This would, I'm sure, require some DllCall's.

A little easter egg. The example sentence I used above actually uses every single letter of the English alphabet. :lol:
AutoHotkey state, the forum, Poly, and Drainx1. The short story.
I love my wife, my life, my atomic-match; for giving me the greatest gift a man could ask for, such a perfect and beautiful little girl.
9rjbjc.png

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
word can highlight text by applying: color, bold, font, and size (maybe more) the basis of this, and that capability in Wordpad is RTF (rich text formatting).

Notepad only allows for text. Maybe unicode, but not the other things I listed.

I >>believe<< RTF can be displayed in FireFox.
I know I have seen google cached pages that show multiple colors to hightlight found words.

(interestingly, the ahk helpfile has some sort of highighting
(trythis: select the sarch tab and type in filename, from the result list select "FileSelectFile" and you'll find "filename" highlighted multiple independent times)

tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
Google Cache edits the websites source code and changes the background color of the matched text.

AHK_Help.chm is a compiled HTML, which I'm guessing it does something similar.

RTF does support color/style/formatting, thats why it's "rich".
websites are RTF, thats why you see color, bold, etc. but thats all hard-coded into the website (html, css, etc). you can't be changed unless you modify the source.

'selecting' AFAIK, is a windows feature. and if there is no easy way to select multiple texts because it's built-in. it'll be very hard to make a work around. and it most likely won't work everywhere like you want. So try and make it work in 1 application to get an understanding, then attempt global.

" A little easter egg. The example sentence I used above actually uses every single letter of the English alphabet. "
Old fact. thats why you see it in the font viewer files (open and view a .ttf file in '.\Windows\fonts\')

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


Eedis
  • Members
  • 1775 posts
  • Last active: Aug 14 2015 06:33 PM
  • Joined: 12 Jun 2009
Well to me, this project will be pushed behind several other projects that I actually have currently in mid production.... So it probably will never get done by my hands. :)

Old fact. thats why you see it in the font viewer files (open and view a .ttf file in '.\Windows\fonts\')

You're spot on tidbit. Not much people know that.
AutoHotkey state, the forum, Poly, and Drainx1. The short story.
I love my wife, my life, my atomic-match; for giving me the greatest gift a man could ask for, such a perfect and beautiful little girl.
9rjbjc.png

Brolaf
  • Members
  • 8 posts
  • Last active: Feb 11 2013 03:34 PM
  • Joined: 10 Feb 2013

Step one: hold down CTRL

Step two: double click each word

Step three: profit

 

Is this what you want to do?  I'm having trouble understanding the request



Brolaf
  • Members
  • 8 posts
  • Last active: Feb 11 2013 03:34 PM
  • Joined: 10 Feb 2013

ehmm, anyone know how to simulate a highlight text?
for example, in notepad when u do Ctrl+F a text, if found, it does highlight the text in file for u

 double click the word