It is currently September 21st, 2020, 11:32 am

Help on editing older script

Help with creating, editing & fixing problems with skins
AdrianJC
Posts: 24
Joined: April 14th, 2020, 9:48 am

Help on editing older script

Post by AdrianJC »

Hi people,

I am currently using a skin that I want to adjust, can someone help me?
I copied the piece of script below.

Code: Select all

****************************************
[ProcessorGather]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=HARDWARE\DESCRIPTION\System\CentralProcessor\0
RegValue=ProcessorNameString

[TitleString]
Meter=String
X=0
Y=0
W=200
H=#BoxHeight#
FontFace=#Font#
FontSize=#FontHeight#
FontColor=#TitleColor#
SolidColor=#MouseBiteColor#
StringStyle=Bold
AntiAlias=#AntiA#
Text="PROCESSOR"

[DataString]
Meter=String
MeasureName=ProcessorGather
X=72
Y=0
FontFace=#Font#
FontColor=#DataColor#
FontSize=#FontHeight#
AntiAlias=#AntiA#
Text="%1"

****************************************
the output of this is that there is the text in 1 line:

PROCESSOR "processor information"

What I would like is for these to be 2 lines so:

1. PROCESSOR
2. "processor info"

Is this possible
Last edited by balala on September 4th, 2020, 9:43 am, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
mak_kawa
Posts: 867
Joined: December 30th, 2015, 9:47 am

Re: Help on editing older script

Post by mak_kawa »

Hi AdrianJC

Your posted code is missing variables for several colors and text height. So, I added them, your code works well.
Untitled-1.png
What an old-fashioned CPU...:-)

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=192,192,192,192

[Variables]
BoxHeight=20
FontHeight=10
TitleColor=255,255,255,192
DataColor=0,0,0,192
MouseBiteColor=64,64,64,192

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

[TitleString]
Meter=String
X=0
Y=0
;W=200
H=#BoxHeight#
FontFace=#Font#
FontSize=#FontHeight#
FontColor=#TitleColor#
SolidColor=#MouseBiteColor#
StringStyle=Bold
AntiAlias=#AntiA#
Text="PROCESSOR"

[DataString]
Meter=String
MeasureName=ProcessorGather
X=0R
Y=0
FontFace=#Font#
FontColor=#DataColor#
FontSize=#FontHeight#
AntiAlias=#AntiA#
Text="%1"
Ps. I have forgotten to add #AntiA# variable... so attached image shows no antialiasing for text, sorry.
You do not have the required permissions to view the files attached to this post.
Last edited by mak_kawa on September 4th, 2020, 9:56 am, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help on editing older script

Post by balala »

Sorry mak_kawa, you beat me. Again...
AdrianJC wrote: September 4th, 2020, 9:02 am Is this possible
Yes, it is. I have two suggestestions:
  • Replace the X and Y options of the [DataString] meter as it follows:

    Code: Select all

    [DataString]
    ...
    X=0r
    Y=3R
    ...
    To adjust the vertical position of the [DataString] meter, you can replace the numeric value of the 3R value in the Y option, finding the desired value.
  • A much better solution in my opinion would be to use only one single String meter, instead of the existing [TitleString] and [DataString] meters. If you want to give it a try, replace the mentioned meters with the following one:

    Code: Select all

    [TitleDataString]
    Meter=String
    MeasureName=ProcessorGather
    X=0
    Y=0
    FontFace=#Font#
    FontSize=#FontHeight#
    FontColor=#TitleColor#
    SolidColor=#MouseBiteColor#
    StringStyle=Bold
    AntiAlias=#AntiA#
    Text=PROCESSOR#CRLF#%1
AdrianJC
Posts: 24
Joined: April 14th, 2020, 9:48 am

Re: Help on editing older script

Post by AdrianJC »

Thank you so much i'm gonna play around with this, just a beginner on this site trying to understand it all..

Whahahahaha yeah old guy older CPU :D
mak_kawa wrote: September 4th, 2020, 9:45 am Hi AdrianJC

Your posted code is missing variables for several colors and text height. So, I added them, your code works well.
Untitled-1.png
What an old-fashioned CPU...:-)

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=192,192,192,192

[Variables]
BoxHeight=20
FontHeight=10
TitleColor=255,255,255,192
DataColor=0,0,0,192
MouseBiteColor=64,64,64,192

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

[TitleString]
Meter=String
X=0
Y=0
;W=200
H=#BoxHeight#
FontFace=#Font#
FontSize=#FontHeight#
FontColor=#TitleColor#
SolidColor=#MouseBiteColor#
StringStyle=Bold
AntiAlias=#AntiA#
Text="PROCESSOR"

[DataString]
Meter=String
MeasureName=ProcessorGather
X=0R
Y=0
FontFace=#Font#
FontColor=#DataColor#
FontSize=#FontHeight#
AntiAlias=#AntiA#
Text="%1"
Ps. I have forgotten to add #AntiA# variable... so attached image shows no antialiasing for text, sorry.
AdrianJC
Posts: 24
Joined: April 14th, 2020, 9:48 am

Re: Help on editing older script

Post by AdrianJC »

Thanks for your help like i said i'm gonna play around with this, things don't work out of the box as I expected. I have to put several scripts into one and hope it all works the way i want it to.....

:thumbup:
balala wrote: September 4th, 2020, 9:53 am Sorry mak_kawa, you beat me. Again...


Yes, it is. I have two suggestestions:
  • Replace the X and Y options of the [DataString] meter as it follows:

    Code: Select all

    [DataString]
    ...
    X=0r
    Y=3R
    ...
    To adjust the vertical position of the [DataString] meter, you can replace the numeric value of the 3R value in the Y option, finding the desired value.
  • A much better solution in my opinion would be to use only one single String meter, instead of the existing [TitleString] and [DataString] meters. If you want to give it a try, replace the mentioned meters with the following one:

    Code: Select all

    [TitleDataString]
    Meter=String
    MeasureName=ProcessorGather
    X=0
    Y=0
    FontFace=#Font#
    FontSize=#FontHeight#
    FontColor=#TitleColor#
    SolidColor=#MouseBiteColor#
    StringStyle=Bold
    AntiAlias=#AntiA#
    Text=PROCESSOR#CRLF#%1
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help on editing older script

Post by balala »

AdrianJC wrote: September 4th, 2020, 11:42 am I have to put several scripts into one and hope it all works the way i want it to.....
Feel free to come back anytime if further questions arise...
mak_kawa
Posts: 867
Joined: December 30th, 2015, 9:47 am

Re: Help on editing older script

Post by mak_kawa »

Hey AdrianJC

I am now planning to change this really old (Sandy Bridge!!) CPU :-) to 3rd generation Ryzen 5 3600 or 10th generation i5 10400F... but couldn't yet.
AdrianJC
Posts: 24
Joined: April 14th, 2020, 9:48 am

Re: Help on editing older script

Post by AdrianJC »

I'm looking for a system info setup, i've been testing some different themes already but still have the feel that i'm missing parts.
After running in to the Rainmeter SysInfo theme i thought to give this a shot but there's a lot to choose from.....

balala wrote: September 4th, 2020, 11:49 am Feel free to come back anytime if further questions arise...
AdrianJC
Posts: 24
Joined: April 14th, 2020, 9:48 am

Re: Help on editing older script

Post by AdrianJC »

That sound like a good plan, i've just upgraded my system last year in october so im good so far.....
hope you can put your plans to a build soon

mak_kawa wrote: September 4th, 2020, 12:22 pm Hey AdrianJC

I am now planning to change this really old (Sandy Bridge!!) CPU :-) to 3rd generation Ryzen 5 3600 or 10th generation i5 10400F... but couldn't yet.
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help on editing older script

Post by balala »

AdrianJC wrote: September 5th, 2020, 3:18 pm After running in to the Rainmeter SysInfo theme i thought to give this a shot but there's a lot to choose from.....
Perfectly agree. But if you need it, it probably does worth to dig into it.