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

How to make color transfusion

Get help with creating, editing & fixing problems with skins
User avatar
David8192
Posts: 246
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom
Contact:

Re: How to make color transfusion

Post by David8192 »

GFTs wrote: June 10th, 2022, 5:14 pm thank you so much!!
Anytime
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

maybe one more question :D can i add a little image in front of the clock ? like a few pixels enough to fit in the taskbar :D
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 5:14 pm thank you so much!!
Just an advice for the future - most of the things related to syntax, like time formatting and others, are found in the manual as well. The idea is that for such things, the user can easily search for the desired setting, especially since the manual explains stuff much better than a targeted answer could. Obviously, only looking in the manual won't be enough for more complex tasks, but it's a great starting point, all that's needed is reasonable navigation skills. :D
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 5:28 pm maybe one more question :D can i add a little image in front of the clock ? like a few pixels enough to fit in the taskbar :D
Sure you can, take a look here. The simplest form of it is basically just:

Code: Select all

[SomeImage]
Meter=Image
ImageName=PathToTheImage
To place it near another meter in various ways, the X and Y (and sometimes the W and H) help, especially when it comes to relative positioning, as well as the corresponding section variable parameters.

In your specific case something like:

Code: Select all

[SomeImage]
X=probably 0 if you want it at the left
...

[YourText]
X=0R
...
This will put the text at the right of the image, with 0 pixels as a "gap" between them.

EDIT: In case you didn't figure it out by now, replacing the MeterClock with an Image meter and itself in your code:

Code: Select all

[MeterImage]
Meter=Image
ImageName=#@#a.png

[MeterClock]
Meter = STRING
MeasureName = MeasureClock
MeterStyle = FontStyle
FontColor = [Transition]
X = ([MeterImage:W]+#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
will produce something like:
ImageAndClock.jpg
I used the section variable parameters mentioned above, since it was easier considering that your clock text is center aligned. It can be done using relative positioning as well, but there are some particularities that are different for centered stuff compared to left aligned ones.
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

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 = 320
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

[SomeImage]
X=0
Meter=Image
ImageName=C:\Users......
don't know what i did wrong.
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

nevermind, i found it. i had to add .jpg at the and. now i need to figure it out how to resize the image or to move it..
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 6:29 pm

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 = 320
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

[SomeImage]
X=0
Meter=Image
ImageName=C:\Users......
don't know what i did wrong.
Check my edit above and just replace the path in the ImageName option with your own. In the code you posted now, you don't even have a valid path to an image, and your image meter is AFTER the text meter. The image meter should be be BEFORE the text meter if you want to easily position the text AFTER the image.

In other words, meters are drawn in the skin in the order they are placed in the code. Same for the execution of measures.
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

my image is just to big. can i resize it from the code ? ore to make to fit as the clock height and width ?
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 6:37 pm nevermind, i found it. i had to add .jpg at the and. now i need to figure it out how to resize the image or to move it..
You resize it by changing the W or H or both. You move it by changing the X or Y or both. ;-)
GFTs wrote: June 10th, 2022, 6:45 pm my image is just to big. can i resize it from the code ? ore to make to fit as the clock height and width ?
Yes, you should do something like this:

Code: Select all

H=[MeterClock:H]
PreserveAspectRatio=1
DynamicVariables=1
in the image meter, to make its height exactly as the clock text's and preserve the aspect ratio. You'd probably need to set Y=0 in MeterClock as well, to move the text at the same level as the resized image.

Or you could just set the H of the image to a different numerical value, according to what you'd like visually.
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

Hi there. Hope you are well, never got the oportunity to thank you because i lost my laptop in the company that i worked for, and today as i searched for a cooling system in our deposit, i found my old laptop that i used, found every paswords, accounts, even the clock was working very well, kinde miss it.

Also, if i can bother you with one more qurstion, is it possible to measure the temperature of the cpu, gpu, ram and even disk , then return that value into the clock ? Or even better, both temperature and usages of the cpu, gpu, ram and disk. Like "CPU: 38°|75% GPU: 45°|56%" and so on
Post Reply