It is currently September 29th, 2024, 7:32 am

Is there a command that can read the resolution of your screen?

General topics related to Rainmeter.
Licoricemint
Posts: 10
Joined: June 6th, 2016, 1:16 am

Is there a command that can read the resolution of your screen?

Post by Licoricemint »

Hi again,

Sorry for asking so many questions. Is there some kind of command you can run at the start of your rainmeter code that will read the X and Y magnitudes of your screen size? I would like to be able to scale the size of my meters based on screen resolution. The meters I'm designing are simply text and do not involve graphics or anything.

Best Regards,
Licoricemint
User avatar
jsmorley
Developer
Posts: 22783
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Is there a command that can read the resolution of your screen?

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureScreenW]
Measure=Calc
Formula=#SCREENAREAWIDTH#

[MeasureScreenH]
Measure=Calc
Formula=#SCREENAREAHEIGHT#

[MeterScreen]
Meter=String
MeasureName=MeasureScreenW
MeasureName2=MeasureScreenH
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1 | %2
1.jpg
https://docs.rainmeter.net/manual/variables/built-in-variables/#MonitorVariables
You do not have the required permissions to view the files attached to this post.
Licoricemint
Posts: 10
Joined: June 6th, 2016, 1:16 am

Re: Is there a command that can read the resolution of your screen?

Post by Licoricemint »

Thank you jsmorley!
User avatar
jsmorley
Developer
Posts: 22783
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Is there a command that can read the resolution of your screen?

Post by jsmorley »

Glad to help.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Is there a command that can read the resolution of your screen?

Post by fonpaolo »

...or you can completely avoid measures using:

Code: Select all

[MeterScreen]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=#SCREENAREAWIDTH# | #SCREENAREAHEIGHT#