It is currently September 8th, 2024, 4:47 am

Solved: Change Opacity/FontColor as per Conditions.

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Solved: Change Opacity/FontColor as per Conditions.

Post by Yincognito »

ZXCVBOT wrote: October 5th, 2023, 4:49 pm Well, Thanks again!

Even if I would've guessed the quotes, I would be stuck again without an "Escape" (see what I did there?). :D
Talking of spaces, unrelated to this forum: paths to file: they may contain spaces, but how does rainmeter handle them?

I tried:
Path\To File\Blah.exe
"Path\To File\Blah.exe"
Path\"To File"\Blah.exe & Path\'To File'\Blah.exe
(Path\To File\Blah.exe)
...
Declared the path as a variable and file as another and referred/linked them to one other variable.

But none are working. Also, before you send me a manual link, check it yourself, they do not contain anything about spaces. Yet, the 1st, 2nd and 3rd work normally "just exactly as it is in Windows or a command window (DOS)" (referring to the 1st link below). Somehow, the ones without spaces work.

https://forum.rainmeter.net/viewtopic.php?t=16432
https://docs.rainmeter.net/manual/skins/
There is a space between Path and To though, unless you talk about different variables. If it's a single variable, then "Path\To File\Blah.exe" is the correct form for its value. If PathVar="Path\To" and FileVar="File\Blah.exe" are the two variables, then "#PathVar# #FileVar#" will achieve the same. The quoting is mostly recommended in bangs, since the space character is a separator between bang parameters, and if quotes are omitted for a space including string, Rainmeter will interpret the space separated parts of that string as different parameters instead of a single one. In the case of options, Rainmeter will remove the starting and ending quotes from the value anyway, so quoting is not an absolute necessity.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Solved: Change Opacity/FontColor as per Conditions.

Post by ZXCVBOT »

Thank you again for explaining and solving an unrelated query.

(The ... and Declared lines meant some more tries that did not work or I did not remember and finally trying to declare them in two variables).

"Rainmeter will interpret the space separated parts of that string as different parameters instead of a single one. In the case of options, Rainmeter will remove the starting and ending quotes from the value anyway, so quoting is not an absolute necessity."

So, how does one achieve the absolute same thing, how can I use a string that with no change will be accepted.

Best example so far would be adding " " space characters or a tab (other whitespaces require little-endian and utf-16) to the end of your string and Rainmeter doesn't interpret it and displays the string as how it would have been without " ". Just try it out sometime and if you happen to know a way around - do tell.
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Solved: Change Opacity/FontColor as per Conditions.

Post by Yincognito »

ZXCVBOT wrote: October 6th, 2023, 12:27 pmSo, how does one achieve the absolute same thing, how can I use a string that with no change will be accepted.

Best example so far would be adding " " space characters or a tab (other whitespaces require little-endian and utf-16) to the end of your string and Rainmeter doesn't interpret it and displays the string as how it would have been without " ". Just try it out sometime and if you happen to know a way around - do tell.
If you're talking about String meters, this can be achieved with a combination of quoting and using the TrailingSpaces option. Similar to how beginning and ending quotes are handled in options (I should have written "ignore" rather than "remove" when talking about them earlier), by default Rainmeter will also ignore / remove the trailing spaces from an option, and this can be undesirable if you want to display these too in a String meter.

P.S. Also, since we're at it, you might want to check the magic quotes paragraph in the manual, if by any chance you have quotes inside the quoted string when using it in a bang.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Solved: Change Opacity/FontColor as per Conditions.

Post by ZXCVBOT »

Both helped me in learning a new thing, but the TrailingSpaces was the one I was after.

Thank you once more! (Too many thanks huh? Does this spoil you?)
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Solved: Change Opacity/FontColor as per Conditions.

Post by Yincognito »

ZXCVBOT wrote: October 6th, 2023, 1:07 pm(Too many thanks huh? Does this spoil you?)
I can't be spoiled, I have natural defenses against it (and a couple of other similar things). :sly:
Joking aside, I generally don't believe in niceties (like thank yous, sorrows, pleases, you're welcomes and many others that regular people do), albeit I admit that they're pleasant to have - it usually means things related to them paid off. In the case of helping out this obviously brings satisfaction for both parties involved. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth