I have a skin that measures my gpu temp output. I'm trying to get it to change the color of the text in five different stages, based on temperature, only it doesn't seem to be working at all. My text remains at the base color. If anyone can spot where I went wrong, I'd greatly appreciate it
Fuzzybat23 wrote:I have a skin that measures my gpu temp output. I'm trying to get it to change the color of the text in five different stages, based on temperature, only it doesn't seem to be working at all. My text remains at the base color. If anyone can spot where I went wrong, I'd greatly appreciate it
The main issue is with the !SetVariable bangs. As you wrote them, the used color codes contain spaces and in such cases, they should be included into quotation marks:
Note that in the above code, I also removed the "leading zeros" from the color codes, because they are not needed. Although even if you leave them there, the code will still work, they are useless. The decimal color codes don't need them, just the hex codes do:
Even if the color codes don't have spaces, they are in fact strings, so you should get to used to use the quotations.
A few more tips:
The !Rainmeter... bang prefix is deprecated. Remove them, they are not needed any more.
The [TempBarCalc] measure isn't posted. Make sure you have it in your code, because its name is used in the IfCondition options, so, to work properly, the code needs it. On the other hand, if you've used it in the conditions, I'd move these conditions to the [TempBarCalc] measure itself. Although if the measure is properly created the conditions will work, no matter in which measure have you placed them, in my opinion would be more logical to put the conditions into the appropriate measure itself.
From the point of view of the code, this definitely doesn't matter, but the name of the [MeterCelcius] meter probably is wrong, it should be [MeterCelsius]. If you'll take a break, then later will come back to your code and will want to continue working on it, this small typo can give you a lot of headache. I'd fix it, to avoid such later problems.
Neither this is not a great problem, but the Plugin option of the [MeasureGPUTemp] measure should be written into a more concise form: Plugin=MSIAfterburner, instead of Plugin=[color=#FF0000]Plugins\[/color]MSIAfterburner[color=#FF0000].dll[/color]. It's perfectly enough.