It is currently March 28th, 2024, 10:04 pm

Is there a way to obtain the height of another skin?

Get help with creating, editing & fixing problems with skins
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Is there a way to obtain the height of another skin?

Post by Codger »

I assume there is a way to read the height value from rainmeter.ini but I have no idea how to do that.
Or perhaps even an easier way?
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is there a way to obtain the height of another skin?

Post by balala »

Codger wrote:I assume there is a way to read the height value from rainmeter.ini but I have no idea how to do that.
Or perhaps even an easier way?
A skin in a not too simple way (as you said, reading the Rainmeter.ini, with the WebParser plugin), can get the position of another skin, but I don't see any way to get its size. Usually the size isn't kept in the Rainmeter.ini, like the position is and a skin doesn't know this detail about another one.
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Is there a way to obtain the height of another skin?

Post by Codger »

I can right the height (from the other skin) to the rainmeter.ini. I just couldm't think of a way of getting it out. WebParser never occurred to me. Thank you.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is there a way to obtain the height of another skin?

Post by balala »

Codger wrote:I can right the height (from the other skin) to the rainmeter.ini. I just couldm't think of a way of getting it out. WebParser never occurred to me.
I suppose you mean you can write the height. Worth it?
If yes, the following measure will read the needed value:

Code: Select all

[MeasurePos]
Measure=Plugin
Plugin=WebParser
Url=file://#SETTINGSPATH#Rainmeter.ini
RegExp=(?siU)[ADD-HERE-THE-NAME-OF-THE-CONFIG].*WindowH=(.*)\n
StringIndex=1
Obviously to make this measure to work, you have to add the name of the config (to the RegExp option). The height you wrote in Rainmeter.ini has to be written to the WindowH option of the appropriate section (but if you're using another option name, obviously you can replace it in the RegExp option).