It is currently October 5th, 2024, 3:19 pm

Pour Clock

Clocks and timer skins
User avatar
jsmorley
Developer
Posts: 22819
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Pour Clock

Post by jsmorley »

Hmm... I must be missing something in this.

If I wanted to do the same with a full string like CPU Name, would it still work, and what role does the variable setting for "W" play?

I have something like this:

Code: Select all

;=================================================
; Rainmeter configuration file
; Updated April 22, 2010
;=================================================

;[BEGIN CONFIG FILE]==============================

[Rainmeter]
Author=Jeffrey Morley
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
Update=500

[MeasureCPU]
Measure=CPU

[MeasureCPUName]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=HARDWARE\DESCRIPTION\System\CentralProcessor\0
RegValue=ProcessorNameString
UpdateDivider=3000

[MeterCPUNameGray]
Meter=String
MeasureName=MeasureCPUName
FontFace=Trebuchet MS
FontColor=180,180,180,255
FontSize=25
AntiAlias=1
StringStyle=BOLD
X=0
Y=0
W=900
H=35

[MeterCPUNameColor]
Meter=String
MeasureName=MeasureCPUName
FontFace=Trebuchet MS
FontColor=255,0,0,255
FontSize=25
AntiAlias=1
StringStyle=BOLD
X=0r
Y=0r
W=900
H=15
And I was just at the very early stages of testing the "truncation" effect with fixed values (it is my intention to use the percentage of CPU "used" once I get the concept down.

This doesn't seem to do what I expected. I was sort of expecting the "color" meter to be truncated in height, showing the gray meter behind it... Clearly I am missing something.
User avatar
kenz0
Developer
Posts: 263
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Pour Clock

Post by kenz0 »

"ClipString" is indispensable to this truncation trick. So you need to add ClipString=1 to [MeterCPUNameColor] section.

Note that fixed W/H is surely required for ClipString. So in the case where the length of a character string is dynamic, this trick is not actually suitable. Because you come to have to define long enough W beforehand.
.
Image
User avatar
jsmorley
Developer
Posts: 22819
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Pour Clock

Post by jsmorley »

kenz0 wrote:"ClipString" is indispensable to this truncation trick. So you need to add ClipString=1 to [MeterCPUNameColor] section.

Note that fixed W/H is surely required for ClipString. So in the case where the length of a character string is dynamic, this trick is not actually suitable. Because you come to have to define long enough W beforehand.
Ah! I missed the ClipString part of it. That makes sense. As far as the "W", as long as it is big enough to hold the widest anticipated string it should be ok?
User avatar
kenz0
Developer
Posts: 263
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Pour Clock

Post by kenz0 »

Yes, that's right.
.
Image
User avatar
jsmorley
Developer
Posts: 22819
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Pour Clock

Post by jsmorley »

;-)

Image
gingerNINJA
Posts: 1
Joined: June 28th, 2010, 4:18 am

Re: Pour Clock

Post by gingerNINJA »

Im a bit of a nublet when it comes to this coding stuff, can someone send me their pourclock.inc with the update on 100 and the average size 10, i have been fiddling around with some trial and error but cant get it right :|