Maybe there is already an easy way to do this that I'm not aware of, but I would love a dynamic built-in variable that outputs the screen the current config is currently on.
eg.
Screen 1 - Output = 1
Screen 2 - Output = 2
Screen 3 - Output = 3
It is currently October 13th, 2024, 1:04 am
[Suggestion] Built-in variable #CURRENTCONFIGSCREEN#
-
- Posts: 285
- Joined: May 12th, 2019, 8:55 am
-
- Rainmeter Sage
- Posts: 8441
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [Suggestion] Built-in variable #CURRENTCONFIGSCREEN#
Not really what you want, but indirectly, isn't what AutoSelectScreen and the related bang does to the monitor variables?Cariboudjan wrote: ↑March 25th, 2022, 6:13 pm Maybe there is already an easy way to do this that I'm not aware of, but I would love a dynamic built-in variable that outputs the screen the current config is currently on.
eg.
Screen 1 - Output = 1
Screen 2 - Output = 2
Screen 3 - Output = 3
I can't test it since I don't have the system for it, but it looks to do what you mentioned ... except in reverse. Or at least that's what I understand from there.
-
- Posts: 285
- Joined: May 12th, 2019, 8:55 am
Re: [Suggestion] Built-in variable #CURRENTCONFIGSCREEN#
Yes, but I need it to do the reverse
-
- Rainmeter Sage
- Posts: 8441
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [Suggestion] Built-in variable #CURRENTCONFIGSCREEN#
Yep, indeed. I was going to say that you could find the N in Lua by comparing #SCREENAREAX#, #SCREENAREAY#, #SCREENAREAWIDTH#, #SCREENAREAHEIGHT# (which would refer to the desired monitor, if the auto select stuff is used) with #SCREENAREAX@N#, #SCREENAREAY@N#, #SCREENAREAWIDTH@N#, #SCREENAREAHEIGHT@N#, using a FOR like this:
@Resources\Script.lua:
Code: Select all
function MonitorVariables()
local n, monitorvariables = 0, ''
for i = 1, 10 do
if tonumber(SKIN:ReplaceVariables('#SCREENAREAX@' .. i .. '#')) == tonumber(SKIN:ReplaceVariables('#SCREENAREAX#')) and
tonumber(SKIN:ReplaceVariables('#SCREENAREAY@' .. i .. '#')) == tonumber(SKIN:ReplaceVariables('#SCREENAREAY#')) and
tonumber(SKIN:ReplaceVariables('#SCREENAREAWIDTH@' .. i .. '#')) == tonumber(SKIN:ReplaceVariables('#SCREENAREAWIDTH#')) and
tonumber(SKIN:ReplaceVariables('#SCREENAREAHEIGHT@' .. i .. '#')) == tonumber(SKIN:ReplaceVariables('#SCREENAREAHEIGHT#')) then n = i end
monitorvariables = monitorvariables .. i .. ': ' .. SKIN:ReplaceVariables('#SCREENAREAX@' .. i .. '#, #SCREENAREAY@' .. i .. '#, #SCREENAREAWIDTH@' .. i .. '#, #SCREENAREAHEIGHT@' .. i .. '#') .. '\r\n'
end
return 'N = ' .. n .. '\r\n' .. monitorvariables
end
Code: Select all
[Variables]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255
---Measures---
[Script]
Measure=Script
ScriptFile=#@#Script.lua
UpdateDivider=-1
---Meters---
[MeterTest]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="Monitor Variables:#CRLF#[&Script:MonitorVariables()]"
UpdateDivider=-1
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.