Hello, is there any way to find out the color/formatting text in the clipboard? If I copy text and paste it into MS Word the text color is transferred, so its format must be saved in clipboard. Specifically, I would like to find out what line the red text is on. Ideally not looking for a specific text color, but text that is the only one that is a different color than the other lines. Thank you.
150 g Liver sausage with vinegar and onion, bread
100 g Beer cheese, butter, onion, toasts
100 g Pork crackling spread, bread
1 pcs Pickled Hermelín (cheese with white mould), bread
100 g Prague ham with butter and pickled cucumber, bread
100 g Smoked pork neck with horseradish and pickled cucumber, bread
Detect text colour/format in clipboard Topic is solved
Re: Detect text colour/format in clipboard
Is there really no way to find out the colour of the text?
-
- Posts: 4412
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Detect text colour/format in clipboard
Where are you copying the text from?
Re: Detect text colour/format in clipboard
from email
- Noitalommi_2
- Posts: 332
- Joined: 16 Aug 2023, 10:58
Re: Detect text colour/format in clipboard Topic is solved
Hi.
I played around with ClipboardAll() and this is the result. It goes through the binary code in the clipboard once and returns the character codes
and copies it all back into the clipboard, which you can then paste into an editor. It seems to have formatted code where the color can be found.
You could use InStr or RegEx to work further with.
The Twitch link in the email looks something like this:
style='color:#9147FF;text-decoration:none;text-underline:none'>Someone is live!</span></a></span></b><!--EndFragment-->
Here I tested with OpenOffice and a red text:
<TD WIDTH=152 HEIGHT=19 ALIGN=LEFT VALIGN=BOTTOM><FONT FACE="Calibri" COLOR="#FF3333">MyTExt</FONT></TD>
It's something to work with.
Edit: After some testing, putting everthing in a var to search for keywords works. But the search pattern depends on where you copied from.
I played around with ClipboardAll() and this is the result. It goes through the binary code in the clipboard once and returns the character codes
and copies it all back into the clipboard, which you can then paste into an editor. It seems to have formatted code where the color can be found.
You could use InStr or RegEx to work further with.
Code: Select all
#Requires AutoHotkey 2.0
#SingleInstance
F1:: {
ClipSaved := ClipboardAll()
Loop ClipSaved.Size {
if Num := NumGet(ClipSaved.Ptr, A_Index-1, "UChar")
ClipBoard .= Chr(Num)
}
A_Clipboard := ClipBoard ?? "empty"
SoundBeep
}
style='color:#9147FF;text-decoration:none;text-underline:none'>Someone is live!</span></a></span></b><!--EndFragment-->
Here I tested with OpenOffice and a red text:
<TD WIDTH=152 HEIGHT=19 ALIGN=LEFT VALIGN=BOTTOM><FONT FACE="Calibri" COLOR="#FF3333">MyTExt</FONT></TD>
It's something to work with.
Edit: After some testing, putting everthing in a var to search for keywords works. But the search pattern depends on where you copied from.
Who is online
Users browsing this forum: Draken, Jacquesyip, marypoppins_1, Shekhar Singh and 20 guests