What does that have to do with it?death.crafter wrote: ↑September 1st, 2021, 10:13 pm What happens when you use the bang in Rainmeter section?
It is currently April 19th, 2024, 12:20 pm
Click to copy text?
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Click to copy text?
Nothing, just curious cause Set-Clipboard with powershell works fine. I though may be the bang is somehow copying some attributes from the meter, since it has the font specified as Segoe Fluent Icons.
from the Realm of Death
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
The long and the short of it is that if you use a font like Segoe Fluent Icons, you will need to have the font file available in #@#Fonts\ and specifically tell a String meter to use FontFace=Segoe Fluent Icons. Then you can use character references like [\xe756] and it will display fine.
If you use !SetClip to copy that character, that's up to you, it will certainly copy. However, where are you going to paste it that can deal with that character of that particular font?
About the only place you can paste it where it will display is in a Word Processor or other "rich text" application, that is specifically set to use the font Segoe Fluent Icons. Anywhere else you paste it, certainly in any text editor, is just going to display whatever character is defined as "I don't have this character in my set!".
If you use !SetClip to copy that character, that's up to you, it will certainly copy. However, where are you going to paste it that can deal with that character of that particular font?
About the only place you can paste it where it will display is in a Word Processor or other "rich text" application, that is specifically set to use the font Segoe Fluent Icons. Anywhere else you paste it, certainly in any text editor, is just going to display whatever character is defined as "I don't have this character in my set!".
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
I still have no idea what you are talking about. The character is copied just fine. It just can't be pasted anywhere that isn't specifically able and specifically told to use the font Segoe Fluent Icons.death.crafter wrote: ↑September 1st, 2021, 10:22 pm Nothing, just curious cause Set-Clipboard with powershell works fine. I though may be the bang is somehow copying some attributes from the meter, since it has the font specified as Segoe Fluent Icons.
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Click to copy text?
No, I thought the OP wants to copy the raw string and not the font icon. And that should be the case here. Text editors surely wouldn't convert "[\xe756]" to the "I don't t have this character". So what is being copied is the character from the font. Well, I could be wrong.
from the Realm of Death
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
My impression is that he was trying to copy the actual character, resolved from the [\xe756] character reference, and paste it somewhere else. That will just never work. He will, as you say, have to copy the literal "[\xe756]" string and paste that.death.crafter wrote: ↑September 1st, 2021, 10:38 pm No, I thought the OP wants to copy the raw string and not the font icon. And that should be the case here. Text editors surely wouldn't convert "[\xe756]" to the "I don't t have this character". So what is being copied is the character from the font. Well, I could be wrong.
The trick is that it will be hard to copy the character reference, as anyplace you use it and get at it with !SetClip, it will be "resolved" to the actual character before you can copy it. You can use LeftMouseUpAction=[!SetClip "[*\xe756*]"] to "escape" the character variable, but it's going to be tricky to get that from Icon1=[\xe756], #*Icon1*# won't work. That will just copy the literal #Icon1#.
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Click to copy text?
So my question was if you use the bang in Rainmeter section instead of the string meter, will the literal string be copied or it will be resolved to the font icon character that's all. Like in Win+V it will show up as "[\xe756]" and same in the text editor.jsmorley wrote: ↑September 1st, 2021, 9:40 pm I guess I don't really understand.
If I have this skin:
I get this:Code: Select all
[Rainmeter] Update=1000 DynamicWindowSize=1 AccurateText=1 [Variables] Icon1=[\xe756] [MeterOne] Meter=String FontSize=30 Text=#Icon1# FontFace=Segoe Fluent Icons FontWeight=400 FontColor=255,255,255,255 SolidColor=47,47,47,255 Padding=5,5,5,5 AntiAlias=1 LeftMouseUpAction=[!SetClip "#Icon1#"]
1.png
If I click on it, it copies the character into the clipboard, but I can't paste it anywhere where it is going to display as other than some "unknown" symbol. Not even the WIN-V clipboard viewer in Windows will be able to display it. Only some application that is specifically told to use the font "Segoe Fluent Icons" is ever going to display it.
When I use the skin and click on the character, the symbol is certainly copied into the clipboard, but when I paste it in and replace the variable with the copied character, I get this:
2.png
As you can see, the text editor cannot display it. However, if I save that and refresh the skin it displays the character just fine.
from the Realm of Death
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
The character reference will be resolved before !SetClip can get to it no matter where in the skin you use it. A Meter, the [Rainmeter] section, doesn't matter where. He is just going to have to "escape" the character reference to have any hope of this working.
LeftMouseUpAction=[!SetClip "[*\xe756*]"]
LeftMouseUpAction=[!SetClip "[*\xe756*]"]
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Click to copy text?
Ahh, I see, it's the square brackets.jsmorley wrote: ↑September 1st, 2021, 10:51 pm The character reference will be resolved before !SetClip can get to it no matter where in the skin you use it. A Meter, the [Rainmeter] section, doesn't matter where. He is just going to have to "escape" the character reference to have any hope of this working.
LeftMouseUpAction=[!SetClip "[*\xe756*]"]
from the Realm of Death
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Click to copy text?
Not exactly. You could easily copy a literal like [Bob's your uncle] as that doesn't "resolve" to anything. But if it is a #Variable# a [SectionVariable] a [\xe756] character reference variable, and probably mouse variables, it will always resolve as soon as it is read by Rainmeter.