It is currently February 4th, 2023, 3:39 am

How to make color transfusion

Get help with creating, editing & fixing problems with skins
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

Found out how i can measure cpu and ram usage, now i need the temperature for all

Code: Select all

[Rainmeter]
Name = Windows Taskbar Clock
Author = lynxNZL
OnRefreshAction=[!ZPos "2"]
Update=#FastUpdate#
DefaultUpdateDivider=#UpdateDivider#

[Variables]
text_color = 0,255,0,255
bg_color = 0,0,0,1
font = Segoe UI SemiLight
fontsize = 9
w = 500
h = 30
FastUpdate=1
SlowUpdate=10
UpdateDivider=(#SlowUpdate#/#FastUpdate#)
Increment=3
Direction=1
StartColor=0
Quantifier=#StartColor#
Alternator=0

[Transition]
; Disabled=1
Measure=Calc
Formula=((#CURRENTSECTION#+#Increment#)%256)
RegExpSubstitute=1
Substitute="^(.*)$":"(255*(1*(1+(#Direction#))/2+#Alternator#*(1-(#Direction#))/2)-((#Direction#)*(\1)*((1-(#Direction#))/2+(#Direction#)*#Alternator#))),0,(255*(1*(1-(#Direction#))/2+#Alternator#*(1+(#Direction#))/2)+((#Direction#)*(\1)*((1+(#Direction#))/2-(#Direction#)*#Alternator#))),255","^((?:[^,]*,){#Quantifier#})((?:[^,]*,)*)(.*)$":"\2\1\3","\\\d":""
IfCondition=((#CURRENTSECTION#+#Increment#)>=256)
IfTrueAction=[!SetVariable Alternator (1-#Alternator#)][!SetVariable Quantifier ((3+#Quantifier#+#Direction#*#Alternator#*1)%3)]
IfConditionMode=1
UpdateDivider=1
DynamicVariables=1

[MeasureClock]
Timezone = +2
Measure = Time
Format =Gal Ferencz                                                                     | time:[%H:%M] | date:[%#m/%d]

[FontStyle]
FontFace = #font#
FontSize = #fontsize#
FontColor = #text_color#
StringAlign = center
AntiAlias = 1


[Size]
Meter = Image
SolidColor = #bg_color#
w = #w#
h = #h#

[MeterClock]
Meter = STRING
MeasureName = MeasureClock
MeterStyle = FontStyle
FontColor = [Transition]
X = (#w#/2)
Y = 6 
; LeftMouseUpAction=[!UnpauseMeasure Transition][!ToggleMeasure Transition][!SetVariable Quantifier #StartColor#][!SetVariable Alternator 0][!UpdateMeasure Transition][!UpdateMeter *][!Redraw]
; MiddleMouseUpAction=[!TogglePauseMeasure Transition]
UpdateDivider=1
DynamicVariables=1

[measureCPU]
; This measure returns the average CPU load between all cores.
Measure=CPU
Processor=0

[measureRAM]
; Returns the amount of RAM used in bytes.
Measure=PhysicalMemory
UpdateDivider=20
; UpdateDivider sets the rate at which the value of the measure is updated. It is
; calculated as follows: UpdateDivider x Update. In this case, Update is set to
; 1000 milliseconds (in the [Rainmeter] section). 1000 x 20 = 20000 ms or 20 seconds.

[meterValueCPU]
Meter=String
MeterStyle=styleRightText
MeasureName=measureCPU
FontColor = [Transition]
DynamicVariables=1
MeterStyle = FontStyle
X=191
Y=2r
; r stands for relative. In this case, the Y position of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=| CPU:%%1
; %1 stands for the value of MeasureName (measureCPU in this case).

[meterValueRAM]
Meter=String
MeterStyle=styleRightText
MeasureName=measureRAM
FontColor = [Transition]
DynamicVariables=1
MeterStyle = FontStyle
X=260
Y=0r
W=190
H=14
Text=| RAM:%%1
Percentual=1
; Percentual=1 needs to be added her because measureRAM returns the amount
; of RAM used in bytes. Using Percentual=1 will convert that into a percentual value.
User avatar
Yincognito
Rainmeter Sage
Posts: 4842
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: January 20th, 2023, 11:23 am Found out how i can measure cpu and ram usage, now i need the temperature for all
Yes, it's possible to get temperatures as well, but you need to install and let run a monitoring program for such things. Some of the best here are HWiNFO or MSI Afterburner (both free). You'd either need to follow the instructions here for HWiNFO, or get the MSI AB plugin by downloading the correct (32bit or 64bit) version of MSIAfterburner.dll from here, place it into C:\Program Files\Rainmeter\Plugins, restart Rainmeter, run MSIAfterburner.exe and make sure the data you need has a check mark to indicate it's monitored (be aware that the browser security might block such DLLs from downloading, so right click on the links and choose save link in Chrome and then choose Keep on the dll file and ignore the warning; or, if you want the plugin DLLs to be placed appropriately for you, you can install the little test skin from the post here).

Then, when it comes to MSI AB (which I use), it's just a matter of adding the appropriate measures in your skin's code, e.g.:

Code: Select all

[measureGPU]
Measure=Plugin
Plugin=MSIAfterburner.dll
GPU=0
SourceId=48

[measureCPUTemp]
Measure=Plugin
Plugin=MSIAfterburner.dll
DataSource=CPU temperature

[measureGPUTemp]
Measure=Plugin
Plugin=MSIAfterburner.dll
GPU=0
SourceId=0
and create the needed meters to show the result in the skin. For HWiNFO things became simpler lately, as you can see in the link I mentioned above, while MSI AB requires a few extra steps (check the posts on the plugin thread above for more info on the options), but the result is more or less similar. Personally I use MSI AB, because it used to be simpler than HWiNFO in the past, and offers more features in other areas I need (e.g. its own "skin" in games via RTSS, image and video recording, overclocking, etc), but you can choose what fits you best.
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

i don't think i will install anything else, i'm good with only the usage of CPU and RAM. What else can i measure without any plugins ? where i can find the exact documentation what can be measured without any plugins ?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2250
Joined: March 23rd, 2015, 5:26 pm

Re: How to make color transfusion

Post by SilverAzide »

GFTs wrote: January 25th, 2023, 1:35 pm What else can i measure without any plugins ? where i can find the exact documentation what can be measured without any plugins ?
Seriously? How about the Rainmeter manual? Specifically the section on Measures (and Plugins, which refer to the internal ones, not custom 3rd-party ones).
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 4842
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: January 25th, 2023, 1:35 pm i don't think i will install anything else, i'm good with only the usage of CPU and RAM. What else can i measure without any plugins ? where i can find the exact documentation what can be measured without any plugins ?
For the record, not every plugin for Rainmeter involves installing other programs. In the case of measuring temperatures, installing such a program is needed because Rainmeter (or the OS) don't provide (or expose to the user) such capabilities, hence dedicated software is required for the task. Other than that, a plugin is is basically just a .dll file placed in the appropriate folder, usually provided by a "test" skin by the authors in the case of user aka 3rd party plugins (official ones come with Rainmeter), with most of them being open source just like Rainmeter. The ones that aren't open source are often already used by a bunch of people so hypothetical security concerns are quite rare (personally, I never encountered one, in almost a decade of Rainmeter usage). Sure, there is a bit of "work" to tweak the settings of a program needed by some plugins, but in the end, it only seems more complex the first time you try it.

SilverAzide already mentioned where you can find the info you need. I did too (though not as specific), in our conversation from last year. You can even navigate to the manual by clicking on the top left button right below the Rainmeter icon on this forum to open its menu, and choose Documentation. The sidebar on the left in the manual is a very quick and comfortable way of navigating precisely where you want to, depending on your needs.