Page 5 of 6

Re: How to make color transfusion

Posted: June 10th, 2022, 5:20 pm
by David8192
GFTs wrote: June 10th, 2022, 5:14 pm thank you so much!!
Anytime

Re: How to make color transfusion

Posted: June 10th, 2022, 5:28 pm
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

Re: How to make color transfusion

Posted: June 10th, 2022, 6:00 pm
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

Re: How to make color transfusion

Posted: June 10th, 2022, 6:08 pm
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.

Re: How to make color transfusion

Posted: June 10th, 2022, 6:29 pm
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.

Re: How to make color transfusion

Posted: June 10th, 2022, 6:37 pm
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..

Re: How to make color transfusion

Posted: June 10th, 2022, 6:42 pm
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.

Re: How to make color transfusion

Posted: June 10th, 2022, 6:45 pm
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 ?

Re: How to make color transfusion

Posted: June 10th, 2022, 6:54 pm
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.

Re: How to make color transfusion

Posted: January 20th, 2023, 7:47 am
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