It is currently March 28th, 2024, 10:33 am

Is there any function like "#BACKGROUNDWIDTH#"

Get help with installing and using Rainmeter.
Post Reply
andyHwang
Posts: 2
Joined: November 18th, 2017, 2:58 am

Is there any function like "#BACKGROUNDWIDTH#"

Post by andyHwang »

I'm doing customize several docks with resolution.

I need some function to get background image size in docks

Is there any function like it or how to get image size?
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is there any function like "#BACKGROUNDWIDTH#"

Post by balala »

andyHwang wrote:I need some function to get background image size in docks

Is there any function like it or how to get image size?
Depends on how the background is created.
If it's a meter of the skin (something like a [MeterBackground] image meter), then you can use the [MeterBackground:W] section variable, which returns the width of the image meter. Just have to add the DynamicVariables=1 option to any meter or measure where you'd like to use this variable.
If on the other hand the background is set into the [Rainmeter] section, through a Background option, then the #CURRENTCONFIGWIDTH# built in variable will return the width of the skin. Using this variable also requires the DynamicVariables=1 option to be added.
andyHwang
Posts: 2
Joined: November 18th, 2017, 2:58 am

Re: Is there any function like "#BACKGROUNDWIDTH#"

Post by andyHwang »

balala wrote:Depends on how the background is created.
If it's a meter of the skin (something like a [MeterBackground] image meter), then you can use the [MeterBackground:W] section variable, which returns the width of the image meter. Just have to add the DynamicVariables=1 option to any meter or measure where you'd like to use this variable.
If on the other hand the background is set into the [Rainmeter] section, through a Background option, then the #CURRENTCONFIGWIDTH# built in variable will return the width of the skin. Using this variable also requires the DynamicVariables=1 option to be added.
[MeterBackground:W] is working great!! thanks
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is there any function like "#BACKGROUNDWIDTH#"

Post by balala »

Glad to help.
Post Reply