It is currently March 28th, 2024, 12:24 pm

Creating a skin

Get help with creating, editing & fixing problems with skins
Post Reply
SnackM8
Posts: 2
Joined: May 9th, 2017, 2:51 am

Creating a skin

Post by SnackM8 »

Started Yesterday
I'm not sure what I have to do to make my skin look like the one on the right.
Image

the HWiNFO connection is working but what you see is 2 line of info stacked on top of each other.
Spent hours on digging through his 400line of code to see what I have done wrong while modifying it to work with HWiNFO and have RAM changed into CPU temp.

As a result I have lost the ability to create the Icons, background and Text.
Is there another way I can create this look without following another's person rain meter.
;Hope this works.
;This will be a mash of Codes that will work magically into a usefull tool.
;You will need HWiNFO!

[Rainmeter]

;1000 = 1 second
;Lower = More frequent Refresh Rates.
;============================================================================
Update=2000

[Metadata]
Name=LUI
Author=Ashley Pierre Louis
Information=1st Attempt on imatating other skins from scratch. HWiFO & LSM Clean System Usage Meter.
Version=0.0.1

;---------------------------- Variables ---------------------------------

FontName=Coolvetica
;Add new fonts under Rainmeter\Skins\LUI Look Up Info\@Resources\Fonts
;Then change the FontName=

FontWeight=500
;Here you can adjust the thickness of your title fonts.
;You must set it in hundreds, so either 100, 200, 300,... until 900.
;Usually 500 is Regular and 900 is Bold.

NumbersFontName=Arial
;Add new font Numbers
;Rainmeter\Skins\LUI Look Up Info\@Resources\Fonts

NumbersFontWeight=500
;Here you can adjust the thickness of your title fonts.
;You must set it in hundreds, so either 100, 200, 300,... until 900.
;Usually 500 is Regular and 900 is Bold.

CPUTitle1= Usage
;You can change the CPU title by modifying the value above.

CPUTitle2= Temp
;You can change the CPU title by modifying the value above.

showLogos=1
;You can change this value if you want to show the logos/images.

CPULogoPath=#@#\Imgs\CPU_Img.png
RAMLogoPath=#@#\Imgs\RAM_Img.png

backgroundMode=1
;backgroundMode 0 = The default setting. There will be the default background and it will be the long configuration.
;backgroundMode 1 = There will be the default background and it will be the short configuration. (No title bar)
;backgroundMode 2 = There will be the no background and it will be the long configuration.
;backgroundMode 3 = There will be the no background and it will be the short configuration.

BackgroundMode=2
BackgroundMargins=0,0,0,0
Background="#@#\bg\bg.jpg"
SolidColor=23,23,23,0


;------------------------------ Connecting -----------------------------------

[measureShowLogos]
Measure=String
String=#showLogos#

IfCondition=measureShowLogos = 0
IfTrueAction=[!SetOption meterCPULogo1 W 0][!SetOption meterCPULogo2 W 0]
IfCondition2=measureShowLogos = 0
IfTrueAction2=[!SetOption meterCPUTitle1 X 15][!SetOption meterCPUTitle2 X 15]

[measureCPUTitle1]
Measure=String
String=#CPUTitle1#

[measureCPUTitle2]
Measure=String
String=#CPUTitle2#

[meterBackground]
Meter=Image
ImageName=

[measureBackgroundMode]
Measure=String
String=#backgroundMode#

IfCondition8=measureBackgroundMode = 0
IfTrueAction8=[!SetOption meterBackground ImageName "#@#\bg\bg.jpg"]

IfCondition=measureBackgroundMode = 1
IfTrueAction=[!SetOption meterBackground ImageName "#@#\bg\bg_short.jpg"][!SetOption meterCPULogo1 Y 10][!SetOption meterCPUTitle1 Y 10]
IfCondition2=measureBackgroundMode = 1
IfTrueAction2=[!SetOption meterCPUPercent1 Y 19][!SetOption meterCPUBar1 Y 44][!SetOption meterCPULogo2 Y 51][!SetOption meterCPUTitle2 Y 54]
IfCondition3=measureBackgroundMode = 1
IfTrueAction3=[!SetOption meterCPUPercent2 Y 61][!SetOption meterCPUBar2 Y 82]

IfCondition4=measureBackgroundMode = 2
IfTrueAction4=[!SetOption meterBackground ImageName ""]


;---------------------------- Start of CPUtitle1 - Data --------------------------------

[meterCPULogo1]
Meter=Image
ImageName=#CPULogoPath#
W=20
H=20
X=15
Y=60

[meterCPUTitle1]
Meter=String
MeasureName=measureCPUTitle1
StringAlign=Left
FontColor=255,255,255,255
X=38
Y=56
FontSize=16
InlineSetting=Face | #FontName#
InlinePattern=.*
InlineSetting2=CharacterSpacing | 1
InlinePatern2=.*
InlineSetting3=Weight | #FontWeight#
InlinePattern3=.*

[meterCPUBar1]
Meter=Bar
MeasureName=measureCPU1
X=15
Y=90
W=220
H=3
BarOrientation=Horizontal

[meterCPUPercent1]
Meter=String
MeasureName=measureCPU1
StringAlign=Right
FontColor=255,255,255,255
X=238
Y=65
FontSize=12
Text=%1%
InlineSetting=Face | #NumbersFontName#
InlinePattern=.*
InlineSetting2=CharacterSpacing | 1
InlinePatern2=.*
InlineSetting3=Weight | #NumbersFontWeight#
InlinePattern3=.*

; ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ This requires you to Open HWiNFO Shared Memory Viewer and Change the HWiNFOSensorIds

[measureCPU1]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000009
HWiNFOType=CurrentValue

; ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ This requires you to Open HWiNFO Shared Memory Viewer and Change the HWiNFOSensorIds

;---------------------------- End of CPUtitle1 - Data ----------------------------------
;---------------------------- Start of CPUtitle2 - Data --------------------------------

[meterCPULogo2]
Meter=Image
ImageName=#CPULogoPath#
W=20
H=20
X=15
Y=60

[meterCPUTitle2]
Meter=String
MeasureName=measureCPUTitle2
StringAlign=Left
FontColor=255,255,255,255
X=38
Y=56
FontSize=16
InlineSetting=Face | #FontName#
InlinePattern=.*
InlineSetting2=CharacterSpacing | 1
InlinePatern2=.*
InlineSetting3=Weight | #FontWeight#
InlinePattern3=.*

[meterCPUBar2]
Meter=Bar
MeasureName=measureCPU2
X=15
Y=90
W=220
H=3
BarOrientation=Horizontal

[meterCPUPercent2]
Meter=String
MeasureName=measureCPU2
StringAlign=Right
FontColor=255,255,255,255
X=238
Y=65
FontSize=12
Text=%1%
InlineSetting=Face | #NumbersFontName#
InlinePattern=.*
InlineSetting2=CharacterSpacing | 1
InlinePatern2=.*
InlineSetting3=Weight | #NumbersFontWeight#
InlinePattern3=.*

; ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ This requires you to Open HWiNFO Shared Memory Viewer and Change the HWiNFOSensorIds

[measureCPU2]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x100007f
HWiNFOType=CurrentValue

; ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ This requires you to Open HWiNFO Shared Memory Viewer and Change the HWiNFOSensorIds
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Creating a skin

Post by balala »

SnackM8 wrote:
;Hope this works.
It does. But you've forgotten the [Variables] section name, which is completely missing. Add it between the ;---------------------------- Variables --------------------------------- and the FontName=Coolvetica options and refresh the skin:

Code: Select all

;---------------------------- Variables ---------------------------------
[Variables]
FontName=Coolvetica
Tip: when you are posting codes, you should use, instead of the
tags, the

Code: Select all

 ones.
SnackM8
Posts: 2
Joined: May 9th, 2017, 2:51 am

Re: Creating a skin

Post by SnackM8 »

balala wrote:It does. But you've forgotten the [Variables] section name, which is completely missing. Add it between the ;---------------------------- Variables --------------------------------- and the FontName=Coolvetica options and refresh the skin:

Code: Select all

;---------------------------- Variables ---------------------------------
[Variables]
FontName=Coolvetica
Tip: when you are posting codes, you should use, instead of the
tags, the

Code: Select all

 ones.[/quote]

Oh my gawd... 

Thank you, I cant believe I missed one of the first things in that code  :oops: 
[img]https://i.gyazo.com/08441faa682533348d7286727901f055.gif[/img]

I will remember to use Code instead of Spoilers when sharing the code.

Now all I have to do is change the bar color, size and change the Temp 38% to 38 degrees C.

Thx.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Creating a skin

Post by balala »

SnackM8 wrote:Oh my gawd...

Thank you, I cant believe I missed one of the first things in that code :oops:
Don't worry, it happens sometimes. I'm glad if I helped.
SnackM8 wrote:Now all I have to do is change the bar color, size
For this, add some IfConditions and the appropriate IfTrueAction options to the [measureCPU2] measure. Unfortunately I don't have installed neither the HWiNFO and neither its plugin (which requires the app), so I can't be absolutely sure, but probably you'll need some this kind of options:

Code: Select all

IfCondition=(measureCPU2<33)
IfTrueAction=[!SetOption meterCPUBar2 BarColor "0,255,0"][!UpdateMeter "meterCPUBar2"][!Redraw]
IfCondition2=((measureCPU2>=33)&&(measureCPU2<66))
IfTrueAction2=[!SetOption meterCPUBar2 BarColor "255,240,0"][!UpdateMeter "meterCPUBar2"][!Redraw]
IfCondition3=(measureCPU2>=66)
IfTrueAction3=[!SetOption meterCPUBar2 BarColor "255,0,0"][!UpdateMeter "meterCPUBar2"][!Redraw]
Here I used some generic color codes and percentage limits. These options will color the bar to green (with the 0,255,0 color), if the value returned by the measure is below 33, to yellow (255,240,0), if the measure has a value between 33 and 66, respectively to red (color code: 255,0,0), if the value is above 66. Obviously you can change any or both the color codes and the limits, where the color is changed.
SnackM8 wrote:and change the Temp 38% to 38 degrees C.
Replace the Text option of the [meterCPUPercent2] meter, with the following one: Text=%1°C.
Post Reply