It is currently March 28th, 2024, 9:25 pm

Help with achieving a simple skin

Get help with installing and using Rainmeter.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Help with achieving a simple skin

Post by Jose Hidalgo »

Hi everybody,

I'm new to Rainmeter. I know it can do lots of amazing stuff, but for the moment I only want to use it to replace my current Win 7 desktop. Why ? Because my obsolete weather widget doesn't work anymore !

So basically here's what I'd need :
1. A custom background which I already have (jpg file)
2. This ! (this is the top right corner of my 2560x1440 desktop)
Image
- In the top right corner, a weather widget (dark, in °C, and with 3-day forecast or so)
- Just below, a CPU / RAM indicator (no need for individual cores)
- The 3rd widget is reduntant. I only use it to open the Task Manager (blue button), but I can just put a Task Manager shortcut instead.

I have no idea on how to achieve this with Rainmeter, and it's all I want. So can somebody help me, please ?

Thank you :welcome:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:- In the top right corner, a weather widget (dark, in °C, and with 3-day forecast or so)
There are a lot of such skins on both the Share Your Creations section of this forum, or on DeviantArt. Just make a quick search to see what you get. A few examples:
https://forum.rainmeter.net/viewtopic.php?p=151860#p151860
https://forum.rainmeter.net/viewtopic.php?p=151815#p151815
https://forum.rainmeter.net/viewtopic.php?p=150818#p150818
https://forum.rainmeter.net/viewtopic.php?p=151423#p151423
and so on...
Jose Hidalgo wrote:- Just below, a CPU / RAM indicator (no need for individual cores)
There also are a lot of such skin, also will have to make a search:
https://forum.rainmeter.net/viewtopic.php?p=151815#p151815
https://forum.rainmeter.net/viewtopic.php?p=129304#p129304
https://forum.rainmeter.net/viewtopic.php?p=110421#p110421
and so on again...
(These are larger packages, but they all have such skins)
Jose Hidalgo wrote:- The 3rd widget is reduntant. I only use it to open the Task Manager (blue button), but I can just put a Task Manager shortcut instead.
Also more skins posted previously can do this. As I said before, just search.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Oh wow, thanks balala, much appreciated :thumbup:

For the weather part, I'm leaning towards "Speed" : https://www.deviantart.com/minhtrimatrix/art/Speed-165136605
Its weather module is exactly what I'm looking for.

For the CPU & RAM part, I haven't fount anything yet. This is because I'm looking for something REALLY simple and small, like in my previous picture. Just one horizontal bar for the CPU and one horizontal bar for the RAM, that's all !

Once I've found that, I'll start thinking on how to actually create my own skin with these 3 elements (background, weather, CPU/RAM).
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:For the weather part, I'm leaning towards "Speed" : https://www.deviantart.com/minhtrimatrix/art/Speed-165136605
Its weather module is exactly what I'm looking for.
Depend just on you which package do you prefere. That's looking good indeed, but it's an old package and its code should have to be updated a bit. But it's working and this is I think the most important.

Jose Hidalgo wrote:For the CPU & RAM part, I haven't fount anything yet. This is because I'm looking for something REALLY simple and small, like in my previous picture. Just one horizontal bar for the CPU and one horizontal bar for the RAM, that's all !

Once I've found that, I'll start thinking on how to actually create my own skin with these 3 elements (background, weather, CPU/RAM).
You can keep searching to find something you really like, but the mentioned package has a CPU/RAM skin. But that's not as simple as that one you've posted, so I finally wrote a small code, to have something you can strat to work with. If you'd like to try it out, first create a @Resources folder into the root config (the Speed config existing into your Skins folder). The newer skins use a such folder to store to resources used by the skins (like images, sounds, script files and so on). Then copy the bg.png file from either the Speed\Weather\Klear Icons config, or the Speed\Weather\Tick Icons folder to the previously created @Resources folder. Now create a new .ini file into any folder of the existing ones (probably the best would be to create it into the Speed\CPU&RAM config). I named it CPURAM.ini (take care there already is a CPU&RAM.ini file). Copy the following code into this newly created .ini file:

Code: Select all

[Rainmeter]
Update=1000
Background=#@#bg.png

[Variables]

[MeasureCPU]
Measure=CPU

[MeasureRAM]
Measure=PhysicalMemory
MinValue=0
MaxValue=[MeasureRAMTotal]
DynamicVariables=1

[MeasureRAMTotal]
Measure=PhysicalMemory
Total=1

[MeasureRAMPercent]
Measure=Calc
Formula=( 100 * MeasureRAM / MeasureRAMTotal)

[MeterCPU]
Meter=STRING
MeasureName=MeasureCPU
X=55
Y=40
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
InlineSetting=Size | 6
InlinePattern=^(CPU)#CRLF#.*$
Text=CPU#CRLF#%1%

[MeterCPUBar]
Meter=Bar
MeasureName=MeasureCPU
X=5r
Y=-4r
W=190
H=8
BarColor=205,175,180
SolidColor=150,150,150,100
BarOrientation=Horizontal

[MeterRAM]
Meter=STRING
MeasureName=MeasureRAMPercent
X=0r
Y=50r
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
InlineSetting=Size | 6
InlinePattern=^(RAM)#CRLF#.*$
Text=RAM#CRLF#%1%

[MeterRAMBar]
Meter=Bar
MeasureName=MeasureRAM
X=5r
Y=-4r
W=190
H=8
BarColor=185,250,160
SolidColor=150,150,150,100
BarOrientation=Horizontal
Obviously you can start playing around a bit, modifying the options, to personalize the skin, but this is the essence.
Feel free to come back and ask if you have question related to this code.
I hope you can get it to work. Please let me know if you did.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Oh WOW, that's amazing ! Thank you SO MUCH ! :D

Yes, I have managed to make it work, I will tweak it a little bit (if I can), and I will GLADLY post a picture of the final result in this very topic, thanks to you :)

I only have some more questions, probably easy for you given your Rainmeter knowledge :

1. [CPURAM Skin] How could I make the RAM bar change color whenever RAM use is, say, >=80% ?

2. [Weather Skin] Do you think there's a way I could have all the weather info in another language, say, french ? I have looked in the .ini file, but the language info seems to come from the weather site. But I guess the weather site also has a french version, right ?

3. [Weather Skin] What parameter should I tweak in order to have today's weather info text (e.g. "Fair") BELOW the widget instead of being on top of it ?

Many thanks again ! You're awesome ! :17good
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:1. [CPURAM Skin] How could I make the RAM bar change color whenever RAM use is, say, >=80% ?
You can use some IfConditions. Here is almost midnight, but if no one will help you with this, tomorrow I will.
Jose Hidalgo wrote:2. [Weather Skin] Do you think there's a way I could have all the weather info in another language, say, french ? I have looked in the .ini file, but the language info seems to come from the weather site. But I guess the weather site also has a french version, right ?
Just add to the end of each URL option (take care, there are four!) the following: &dayf=0&locale=fr_FR. This way the URL option of the [Current] measure for example become: Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0[color=#FF0000]&locale=fr_FR
[/color]
.
Add the same to the end of all other URLs.
Jose Hidalgo wrote:3. [Weather Skin] What parameter should I tweak in order to have today's weather info text (e.g. "Fair") BELOW the widget instead of being on top of it ?
You have to change the Y option of the [MeterDesc] meter.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Thanks ! Thanks to you I'm beginning to understand stuff ! :17drums

1. Weather skin language : I'm 67% successful.
1. The &locale=fr_FR works, but it seems to affect only the main title of the skin (e.g. "Fair" in english becomes "Beau" in french). 4 URLs only for one main title ? lol
2. I have also replaced "Today" with "Aujourd'hui", and it works.

3. However, I don't know how to make the two upcoming and dynamically named days (e.g. "Monday" and "Tuesday") display in another language. This is the only thing that's missing.

2. CPURAM skin : I have added a LeftMouseUpAction=["taskmgr.exe"] to invoke the Task Manager whenever I click on the CPURAM skin. It works great !

3. CPURAM skin and IF conditions : I'll wait for your input, no worries. Good night ! :)

4. Core Temp skin : I'm 50% successful.
I have created a Core Temp skin, with the Core Temp app starting with Windows, etc. The [MeterMaxTemp] is displayed well (e.g. 43°C).
However, I can't get the [MeterMaxTempBar] to work (it's always stuck at 100%). I'm sure it's a stupid mistake. What do you think ?

Code: Select all

[Rainmeter]
Update=1000
Background=#@#bg_small.png

[Variables]

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature

[MeasureMaxTempPercent]
Measure=Calc
Formula=( 100 * MeasureMaxTemp / 105)

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=68
Y=99
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1°C

[MeterMaxTempBar]
Meter=Bar
MeasureName=MeasureMaxTempPercent
X=73
Y=89
W=97
H=12
BarColor=205,175,180
SolidColor=150,150,150,100
BarOrientation=Horizontal
PS : as promised, I'll post a screenshot once everything is finished, and I'll upload some files if needed in the relevant forum section.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:1. Weather skin language : I'm 67% successful.
1. The &locale=fr_FR works, but it seems to affect only the main title of the skin (e.g. "Fair" in english becomes "Beau" in french). 4 URLs only for one main title ? lol
2. I have also replaced "Today" with "Aujourd'hui", and it works.

3. However, I don't know how to make the two upcoming and dynamically named days (e.g. "Monday" and "Tuesday") display in another language. This is the only thing that's missing.
Ok, related to translating Today, I think you got started to learn how does Rainmeter works, and this is very good. Congratulations and keep working, this is a very good start.
To translate the names of the upcoming two days, you have to add the following option to the [MeasureWeatherDay2] and [MeasureWeatherDay3] measures: Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi" (please check the French translations, I used Google Translate to get them, so probably a quick check would be required).
Jose Hidalgo wrote:3. CPURAM skin and IF conditions : I'll wait for your input, no worries. Good night ! :)
To achieve what you need (want), you have to set dynamically the color of the appropriate Bar meters. I probably would set the color of both meters ([MeterCPUBar] and [MeterRAMBar]). So, first add a set of IfCondition options to the [MeasureCPU] and [MeasureRAMPercent] measures (just add these options, don't remove or change the existing options):

Code: Select all

[MeasureCPU]
...
IfCondition=(#CURRENTSECTION#<80)
IfTrueAction=[!SetOption MeterCPUBar BarColor "185,250,160"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfFalseAction=[!SetOption MeterCPUBar BarColor "255,0,0"][!UpdateMeter "MeterCPUBar"][!Redraw]

[MeasureRAMPercent]
...
IfCondition=(#CURRENTSECTION#<80)
IfTrueAction=[!SetOption MeterRAMBar BarColor "185,250,160"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfFalseAction=[!SetOption MeterRAMBar BarColor "255,0,0"][!UpdateMeter "MeterRAMBar"][!Redraw]
In paralel, because the color of the Bar meters are now set dynamically (through the apropriate options of the above measures), now you can remove the BarColor option of the [MeterCPUBar] and [MeterRAMBar] meters.
Jose Hidalgo wrote:4. Core Temp skin : I'm 50% successful.
I have created a Core Temp skin, with the Core Temp app starting with Windows, etc. The [MeterMaxTemp] is displayed well (e.g. 43°C).
However, I can't get the [MeterMaxTempBar] to work (it's always stuck at 100%). I'm sure it's a stupid mistake. What do you think ?
It's not stupid mistake, it's a small inexperience. It's happening because you didn't set the MinValue and the MaxValue options on the [MeasureMaxTempPercent] measure. These options are required on measures which are used by Bar meters (and any meter which requires percentual value, like Bar, Line or Roundline meter), because with these options, the meter calculates how large the bar should have to be. So, add a MinValue=0 and a MaxValue=100 option to the [MeasureMaxTempPercent] measure.
Last edited by balala on September 10th, 2018, 1:32 pm, edited 1 time in total.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

You are such a great teacher :17nodding Thanks to you I've got everything up and running now ! And it's beautiful !

Image

As promised, here's everything :

@Resources Folder : (it needs these two png images)

https://image.ibb.co/eDvb4p/bg.png
https://image.ibb.co/eAkFx9/bg_small.png

Weather - Klear icons Folder : (I have replaced the pink bg1.png with this blue bg1.png)

https://image.ibb.co/ieow4p/bg1.png

Weather Skin Code : (with Klear Icons, in °C, and in french, can be easily changed I guess - the Location needs also to be changed with this site)

Code: Select all

[Rainmeter]
Author=minhtrimatrix
Update=900

[Variables]
Location=FRXX0055
Metric=M
Font=Segoe UI
FontColor=255, 255, 255, 255
FontInactive=255, 255, 255, 200

[bg1]
ImageName=bg1.png
Meter=IMAGE
X=33
Y=38

[bg]
ImageName=bg.png
Meter=IMAGE
X=0
Y=30

--------------

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0&locale=fr_FR
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)

</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)

</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>

(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)

</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)

</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)

</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1&locale=fr_FR
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)

</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)

</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)

</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)

</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)

</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2&locale=fr_FR
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)

</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)

</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)

</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>

(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3&locale=fr_FR
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)

</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)

</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)

</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>

(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

----------------

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=19
Substitute="Beau":"Beau Temps", " And ":" et ", "Lgt.Clouds":"Nuages Légers", "Lgt.Rain":"Pluie 

Légère", "Lgt.Snow","Neige Légère", "Lgt.Fog":"Brouillard Léger", "Heavy Clouds":"Couvert", "Heavy 

Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige","Heavy Fog":"Brouillard Epais", Clouds":"Nuages", 

"Cloudy":"Nuageux", "Rain":"Pluie", "Storm":"Orage", "Snow/":"Neige & ", "Snow":"Neige", 

"Fog":"Brouillard"

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=18

------------------

[MeasureWeatherDesc1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=9
Substitute=" And ":" et "

[MeasureWeatherDay1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=4
Substitute="N/A":"666"

[MeasureWeatherIcon1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=8

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherTemp1]
IfBelowValue=665
IfBelowAction=!execute [!RainmeterHideMeter MeterNightTemp1][!RainmeterHideMeter MeterNightDay1][!

RainmeterHideMeter MeterNightDesc1][!RainmeterHideMeter MeterNightIcon1][!RainmeterShowMeter 

MeterTemp1][!RainmeterShowMeter MeterDay1][!RainmeterShowMeter MeterDesc1][!RainmeterShowMeter 

MeterIcon1]
IfEqualValue=666
IfEqualAction=!execute [!RainmeterHideMeter MeterTemp1][!RainmeterHideMeter MeterDay1][!

RainmeterHideMeter MeterDesc1][!RainmeterHideMeter MeterIcon1][!RainmeterShowMeter MeterNightTemp1]

[!RainmeterShowMeter MeterNightDay1][!RainmeterShowMeter MeterNightDesc1][!RainmeterShowMeter 

MeterNightIcon1]
DynamicVariables=1

----------------

[MeasureWeatherNightDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=18
Substitute=" And ":" et "

[MeasureWeatherNightTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=17

-----------------

[MeasureWeatherDesc2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=8
Substitute=" And ":" et "

[MeasureWeatherDay2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":

"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=7

------------------

[MeasureWeatherDesc3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=8
Substitute=" And ":" et "

[MeasureWeatherDay3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":

"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38
[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=7

-------------

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=68
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix="°C"

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=66
Y=12
FontColor=#FontColor#
FontSize=12
StringAlign=Center
StringStyle=BOLD
FontFace=#Font#
Antialias=1

[MeterDay]
Meter=STRING
X=34
Y=40
FontColor=255, 255, 255, 220
FontSize=8
StringAlign=Left
StringStyle=Bold
FontFace=#Font#
Text="Aujourd'hui"
Antialias=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
X=41
Y=58

------------

[MeterTemp2]
MeasureName=MeasureWeatherTemp2
Meter=STRING
X=142
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix="°C"

[MeterDay2]
MeasureName=MeasureWeatherDay2
Meter=STRING
X=139
Y=40
FontColor=255, 255, 255, 220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1

[MeterIcon2]
MeasureName=MeasureWeatherIcon2
Meter=IMAGE
X=114
Y=58

------------

[MeterTemp3]
MeasureName=MeasureWeatherTemp3
Meter=STRING
X=212
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix="°C"

[MeterDay3]
MeasureName=MeasureWeatherDay3
Meter=STRING
X=210
Y=40
FontColor=255, 255, 255, 220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1

[MeterIcon3]
MeasureName=MeasureWeatherIcon3
Meter=IMAGE
X=185
Y=58
Meters Skin Code : (requires Core Temp installed and running in the background)

Code: Select all

[Rainmeter]
Update=1000
Background=#@#bg_small.png

LeftMouseUpAction=["taskmgr.exe"]

---------------

[Variables]

[MeasureCPU]
Measure=CPU
IfCondition=(#CURRENTSECTION#>80)
IfTrueAction=[!SetOption MeterCPUBar BarColor "255,255,153"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfFalseAction=[!SetOption MeterCPUBar BarColor "185,250,160"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfCondition=(#CURRENTSECTION#>90)
IfTrueAction=[!SetOption MeterCPUBar BarColor "205,175,180"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfFalseAction=[!SetOption MeterCPUBar BarColor "185,250,160"][!UpdateMeter "MeterCPUBar"][!Redraw]

[MeasureRAM]
Measure=PhysicalMemory
MinValue=0
MaxValue=[MeasureRAMTotal]
DynamicVariables=1

[MeasureRAMTotal]
Measure=PhysicalMemory
Total=1

[MeasureRAMPercent]
Measure=Calc
Formula=( 100 * MeasureRAM / MeasureRAMTotal)
IfCondition=(#CURRENTSECTION#>80)
IfTrueAction=[!SetOption MeterRAMBar BarColor "255,255,153"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfFalseAction=[!SetOption MeterRAMBar BarColor "185,250,160"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfCondition=(#CURRENTSECTION#>90)
IfTrueAction=[!SetOption MeterRAMBar BarColor "205,175,180"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfFalseAction=[!SetOption MeterRAMBar BarColor "185,250,160"][!UpdateMeter "MeterRAMBar"][!Redraw]

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature
IfCondition=(#CURRENTSECTION#>80)
IfTrueAction=[!SetOption MeterMaxTempBar BarColor "255,255,153"][!UpdateMeter "MeterMaxTempBar"][!Redraw]
IfFalseAction=[!SetOption MeterMaxTempBar BarColor "185,250,160"][!UpdateMeter "MeterMaxTempBar"][!Redraw]
IfCondition=(#CURRENTSECTION#>95)
IfTrueAction=[!SetOption MeterMaxTempBar BarColor "205,175,180"][!UpdateMeter "MeterMaxTempBar"][!Redraw]
IfFalseAction=[!SetOption MeterMaxTempBar BarColor "185,250,160"][!UpdateMeter "MeterMaxTempBar"][!Redraw]

[MeasureMaxTempPercent]
Measure=Calc
Formula=( 100 * MeasureMaxTemp / 105)
MinValue=0
MaxValue=100

---------------

[MeterCPUSmallText]
Meter=STRING
X=68
Y=20
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=CPU

[MeterCPU]
Meter=STRING
MeasureName=MeasureCPU
X=68
Y=33
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1%

[MeterCPUBar]
Meter=Bar
MeasureName=MeasureCPU
X=73
Y=22
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal

---------------

[MeterRAMSmallText]
Meter=STRING
X=68
Y=53
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=RAM

[MeterRAM]
Meter=STRING
MeasureName=MeasureRAMPercent
X=68
Y=66
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1%

[MeterRAMBar]
Meter=Bar
MeasureName=MeasureRAM
X=73
Y=55
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal

---------------

[MeterMaxTempSmallText]
Meter=STRING
X=68
Y=86
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=TEMP

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=68
Y=99
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1°C

[MeterMaxTempBar]
Meter=Bar
MeasureName=MeasureMaxTempPercent
X=73
Y=88
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal
Now you have done so much already, but for teaching purposes only, if you have any tips on improving the code, I'll gladly take them :
  • I guess the IF part in the Meters skin could be more efficient (BTW there was a small copy/paste mistake in your own code, you wrote MeterRAMBar instead of MeterCPUBar ;-) ). Probably with some else if I knew how to use them. Something like : if > 90 then RED, else if > 80 then YELLOW, else GREEN.
  • I also replaced the #CRLF# part in your initial Meters skin code, because the vertical spacing between, say, "CPU" small text and "43°C" was too important. So instead I had to create some [MeterCPUSmallText], [MeterRAMSmallText] and [MeterMaxTempSmallText] sections, and X/Y align such texts individually. Again, it works, but I guess it could be more efficient.
Many thanks again Sir ! :17good

PS : I have been to your DeviantArt page, and here's the first comment that I saw : "One of the most helpful person I've even meet in my life". I can ABSOLUTELY CONFIRM THAT ! You're amazing !! :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:
  • I guess the IF part in the Meters skin could be more efficient (BTW there was a small copy/paste mistake in your own code, you wrote MeterRAMBar instead of MeterCPUBar ;-) ). Probably with some else if I knew how to use them. Something like : if > 90 then RED, else if > 80 then YELLOW, else GREEN.
This requires a set of multiple IfCondition / IfTrueAction options:

Code: Select all

[MeasureCPU]
Measure=CPU
IfCondition=(#CURRENTSECTION#>90)
IfTrueAction=[!SetOption MeterCPUBar BarColor "255,0,0"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfCondition2=((#CURRENTSECTION#<=90)&&(#CURRENTSECTION#>80))
IfTrueAction2=[!SetOption MeterCPUBar BarColor "255,240,0"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfCondition3=(#CURRENTSECTION#<=80)
IfTrueAction3=[!SetOption MeterCPUBar BarColor "0,255,0"][!UpdateMeter "MeterCPUBar"][!Redraw]
The IfConditions must be set in a way to have always only one condition true.
And you're right about my mistake related to the not proper meter name, used into the IfTrueAction and IfFalseAction options of the [MeasureCPU] measure. I fixed it and sorry...
Jose Hidalgo wrote:[*]I also replaced the #CRLF# part in your initial Meters skin code, because the vertical spacing between, say, "CPU" small text and "43°C" was too important. So instead I had to create some [MeterCPUSmallText], [MeterRAMSmallText] and [MeterMaxTempSmallText] sections, and X/Y align such texts individually. Again, it works, but I guess it could be more efficient.[/list]
That's why I used some InlineSettings, but as usual, a code can be done in more ways. I'm glad if you got it working as you wanted. About the efficiency, I'd add to the "static" strings (which don't change while the skin is running - I think all three mentioned meters are so) an UpdateDivider=-1 option, which make them to not being updated at all. But those strings being static, they don't even have to be updated. This step can save some (or even more) resources.
Jose Hidalgo wrote:PS : I have been to your DeviantArt page, and here's the first comment that I saw : "One of the most helpful person I've even meet in my life". I can ABSOLUTELY CONFIRM THAT ! You're amazing !! :thumbup:
Many thanks for the appreciations and your kind words.