It is currently April 20th, 2024, 8:16 am

meters overlapping each other...

Get help with creating, editing & fixing problems with skins
RogerDingo
Posts: 14
Joined: February 6th, 2020, 4:11 pm

meters overlapping each other...

Post by RogerDingo »

hi all

first time user of rainmeter and this forum.

im going through the how to guides and following the steps in building my very first skin.
a plugin that i really need to use is the sysinfo - HOST_NAME variable to display the servers host name.... this is the ultimate goal.
i intend on tweaking the default network skin to show the host name but for now... i want to simply get a basic skin working as expected.


so to start myself off with rainmeter....

i copied the sysinfo example found here into my new skin
https://docs.rainmeter.net/manual/plugins/sysinfo/

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255

[MeasureOSVersion]
Measure=Plugin
Plugin=SysInfo
SysInfoType=OS_VERSION
UpdateDivider=-1

[MeasureScreenWidth]
Measure=Plugin
Plugin=SysInfo
SysInfoType=SCREEN_WIDTH
SysInfoData=1

[MeasureScreenHeight]
Measure=Plugin
Plugin=SysInfo
SysInfoType=SCREEN_HEIGHT
SysInfoData=1

[MeterOSVersion]
Meter=String
MeasureName=MeasureOSVersion
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=OS Version: %1

[MeterScreenSize]
Meter=String
MeasureName=MeasureScreenWidth
MeasureName2=MeasureScreenHeight
Y=2R
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=Screen Size: %1 x %2
saved and loaded the skin and voila.. it works fine.
OS Version and Screen size are displayed correctly.

OS Version: Windows Server 2016
Screen Size: 1688 x 1044

great!


so i went ahead and added the following code to display the host name.

Code: Select all

[MeasureComputerName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=HOST_NAME
UpdateDivider=-1
and

Code: Select all

[MeterCompNameLabel]
Meter=String
MeasureName=MeasureComputerName
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=DNS Name: %1

after saving and reloading the DNS Name text is sitting over the top of the OS Version:
i cannot figure out why this is happening ... i cant work out how to get the host name meter to show below the other 2 meters


anybody know whats going on and why this is happening?
what am i missing?

i can only image that im missing something really basic that i havent figured out yet :o

appreciate any help!


cheers
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: meters overlapping each other...

Post by Active Colors »

Hello and welcome!
Looking at your code I have a question.
Do you have coordinates indicated? For example your code will look like this:

Code: Select all

[MeterCompNameLabel]
Meter=String
MeasureName=MeasureComputerName
X=10
Y=50
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=DNS Name: %1
You can use X and Y to place your meters the way you want them placed.
RogerDingo
Posts: 14
Joined: February 6th, 2020, 4:11 pm

Re: meters overlapping each other...

Post by RogerDingo »

ahhh yes.... the example has Y=2R for the screensize meter.. i completely missed this
i added Y=3R into my hostname meter and it worked!

its now displaying correctly and not over lapping!


thanks for your help :thumbup: :thumbup: :thumbup:
RogerDingo
Posts: 14
Joined: February 6th, 2020, 4:11 pm

Re: meters overlapping each other...

Post by RogerDingo »

i think i should be able to tweak the default network skin and add in a few more meters now....

just need to play around with the X and Y's :D
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: meters overlapping each other...

Post by Active Colors »

RogerDingo wrote: February 6th, 2020, 5:07 pm i think i should be able to tweak the default network skin and add in a few more meters now....

just need to play around with the X and Y's :D
Remember that "r" and "R" for relative positions.
For instance:

Imagine you have Meter1 and Meter2 go one after another in your skin file. If you set Meter1 X=10 and Meter2 X=r it will mean that Meter2 will have same X as Meter1. If you make Meter2 X=6r it will mean that Meter2 will be moved 6 pixels away from Meter1 so it will be as if it has 16 X. In other words, indiating "r" to a meter this meter will start at the initial position of the previous meter. "R" is almost same but it takes an end of the previous meter. Imagine you have and image meter called Image1 which has X=10 and W=6. If you have after this meter another object like string, let's call it String1, indicating X=R will mean that it will be positioned as if it has 16 X.

It is useful for having a patternalistic approach to your skins and omitting unnecessary position calculations for every meter.
RogerDingo
Posts: 14
Joined: February 6th, 2020, 4:11 pm

Re: meters overlapping each other...

Post by RogerDingo »

thanks for the info!

ive managed to edit my skin to have all the info thats needed
once i got my head around the X and Ys and the logic of how to measure and meter... it turned out to be a lot easier than expected :D


i have another question but i will start a new thread as its unrelated to this.

thanks for all your help

cheers