It is currently March 28th, 2024, 11:45 pm

double the Value

Get help with creating, editing & fixing problems with skins
Peter von Frosta
Posts: 7
Joined: December 10th, 2017, 12:09 pm

double the Value

Post by Peter von Frosta »

Hi there!

I´m facing a little noob Problem...

I read the Value of the GPU Memory Clock like this:

Code: Select all

[Detect_SGPU1MEMCLK] ; Get GPU Memory Clock
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SGPU1MEMCLK
Result to the Skin:

Code: Select all

[GPUMemTakt2]
Meter=STRING
MeasureName=Detect_SGPU1MEMCLK
X=190
Y=155
FontColor=0,188,242
StringStyle=Normal
FontSize=9
StringAlign=LEFT
Text=%1
AutoScale=1
NumofDecimals=0
AntiAlias=1
My Probles is that I have to double the Value of "SGPU1MEMCLK".

How can I achive that?

Thanks in advance!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: double the Value

Post by balala »

Peter von Frosta wrote:My Probles is that I have to double the Value of "SGPU1MEMCLK".

How can I achive that?
You have to double the value of "SGPU1MEMCLK", or the value of "Detect_SGPU1MEMCLK"?
If you want to double the value of the Detect_SGPU1MEMCLK measure, you can do this though a simple Calc measure:

Code: Select all

[Detect_SGPU1MEMCLK_Double]
Measure=Calc
Formula=( 2 * Detect_SGPU1MEMCLK )
I don't have installed AIDA so I can't check, but if the above Formula doesn't work, try to replace it with Formula=( 2 * [color=#FF0000][[/color]Detect_SGPU1MEMCLK[color=#FF0000]][/color] ), which also requires to add a DynamicVariables=1 option to the measure.
Obviously to see the doubled value, you have to replace the name of the measure into the MeasureName option of the [GPUMemTakt2] meter: MeasureName=Detect_SGPU1MEMCLK_Double.

Tip: usually it's not a good idea to add the comments in the same line as the section name (or any option). Unlike the programming languages, Rainmeter (which is not a programming language) doesn't like this. Add the comment to the next line.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: double the Value

Post by jsmorley »

balala wrote: Tip: usually it's not a good idea to add the comments in the same line as the section name (or any option). Unlike the programming languages, Rainmeter (which is not a programming language) doesn't like this. Add the comment to the next line.
Right.

A ; character is recognized as commenting out a line when it is at the beginning of a line. When it is elsewhere, it is treated as any other character. This might mean it will be ignored when it is seen as an invalid part of an option value, or it might cause the option to fail. In no case is it a good idea to have inline comments in a Rainmeter skin.
Peter von Frosta
Posts: 7
Joined: December 10th, 2017, 12:09 pm

Re: double the Value

Post by Peter von Frosta »

Hey balala,

your solution works like a charm.

Thanks Mate :thumbup:

... and I willl take care of the inline-comments, also.

Cheers!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: double the Value

Post by balala »

Glad to help.