It is currently April 19th, 2024, 3:01 pm

Using Text= with [MeterUserName]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using Text= with [MeterUserName]

Post by CodeCode »

balala wrote: September 5th, 2022, 10:39 am Sorry, but I believe it doesn't, because the user name rarely is the same (DEATHSTAR in this case). This is returned by the [MeasureUserName] measure, so it varies from computer to computer. That's why its length varies as well, so aligning it to left and placing it to certain position, is not doing properly the job.
Based on the posted screenshot and code snippets, I assume TildaNiobe works with illustro's Network skin. If I am right, the [MeterUserName1] and [MeterUserName2] meters should look this way:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=10r
W=190
H=14
Text=Hostname

[MeterUserName2]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureUserName
X=200
Y=r
Text=%1
This is very true about computer names. Some are a garbled string, to something like "Hannah's Open Source Production Machine".
That means an enduser - other then you of course, mighn't ge great results from stretching the skin to fit the long string of words, to just overlapping ther edges. Justy a pointer - there are several ways to mitigate this.
:great:
If you need help or not please enjoy your new hobby - Rainmeter! :thumbup:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Using Text= with [MeterUserName]

Post by balala »

CodeCode wrote: September 19th, 2022, 11:58 pm Justy a pointer - there are several ways to mitigate this.
Yep, the ClipString for instance.
Alexletiti
Posts: 2
Joined: Today, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

Good morning.
I just came across this discussion.
I just installed RainMeter and am using original Illustro.
In System I would like to add the hostname and the OS.
When I added the codes you indicated for the hotsnam, it didn't work for me.
Thank you in advance for your help.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5394
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: Today, 1:25 pm Good morning.
I just came across this discussion.
I just installed RainMeter and am using original Illustro.
In System I would like to add the hostname and the OS.
When I added the codes you indicated for the hotsnam, it didn't work for me.
Thank you in advance for your help.
Did you also copy the new measure code?

Code: Select all

[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=COMPUTER_NAME
Paste that anywhere in the file.
Paste the 2 new meters to the at the bottom end of the file:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=10r
W=190
H=14
Text=Hostname

[MeterUserName2]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureUserName
X=200
Y=r
Text=%1
Save the file and refresh.
Alexletiti
Posts: 2
Joined: Today, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

Yes thank you I only saw it afterwards.
It's all good, it works now.
THANKS.

I would also like just the hostname line to be bigger
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5394
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: 54 minutes ago Yes thank you I only saw it afterwards.
It's all good, it works now.
THANKS.
On the other hand, I would like to put the hostname at the beginning but it doesn't work.

I would also like just the hostname line to be bigger
If I understand your request, you only want the ComputerName and have it aligned to the left side.
To do that you can use all of the values of [MeterUserName2] as the values in [MeterUserName1] (and visa versa if you want the description to the right). To make the name style larger add StringCase=UPPER:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
MeasureName=MeasureUserName
X=10
Y=10r
W=190
StringCase=UPPER
Text=%1

; Optional label
; [MeterUserName2]
; Meter=String
; MeterStyle=styleRightText
; X=200
; Y=r
; H=14
; Text=Hostname
EDIT: You could also add FontSize to [MeterUserName1], but changing the default text size is going to cause other issues and not keep the "look" of illustro skins.