It is currently March 5th, 2024, 3:53 am

HotKey plugin 1.0

Plugins and Addons popular with the Community
User avatar
balala
Rainmeter Sage
Posts: 16041
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HotKey plugin 1.0

Post by balala »

lmiol wrote: May 9th, 2023, 4:00 pm But if it works with depencies, for example like explorer.exe then it not match to me in that way.
Alright, as you want.
User avatar
Yincognito
Rainmeter Sage
Posts: 6858
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HotKey plugin 1.0

Post by Yincognito »

lmiol wrote: May 9th, 2023, 5:40 pm ah. i thout it will calculated in percentage of resulution screen
because not all desktop resolutions the same =(
Taskbar's height is dependent on screen resolution, but not only on that - it also depends on the scaling applied in Windows (at least that are the dependencies I'm aware about). I don't know the exact formula and, as you know, Windows is closed source so we can't take a look there and have it ready to use, but you can investigate scaling using something similar to this:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MonitorScale "Run"]

[MonitorScale]
Measure=Plugin
Plugin=RunCommand
Program=powershell
Parameter=-command $activemonitorsregpath = 'HKCU:\Control Panel\Desktop\PerMonitorSettings'; $genericmonitorslist = Get-ChildItem 'HKLM:\System\CurrentControlSet\Control\GraphicsDrivers\ScaleFactors'; $dpicode = New-Object PSObject -Property @{'4294967295' = '100%'; '4294967294' = '100%'; '0' = '125%'; '1' = '150%'; '2' = '175%';}; $monitors = @(); $monitorindex = 0; foreach ($genericmonitor in $genericmonitorslist) {$regpath = $activemonitorsregpath + '\' + $genericmonitor.PsChildname; if (Test-Path -Path $regpath) {$dpivalue = (Get-ItemProperty -Path $regpath -Name 'DpiValue').'DpiValue'; $monitors += New-Object PSObject -Property @{'Index' = $monitorindex; 'Place' = $regpath; 'Scale' = $dpicode.$dpivalue}; $monitorindex++;}} $monitors | format-list;
State=Hide
OutputType=ANSI
Timeout=10000
;RegExpSubstitute=1
;Substitute="":""
DynamicVariables=1

[Result]
Meter=String
SolidColor=47,47,47,255
FontColor=255,255,255,255
FontFace=Consolas
FontSize=16
AntiAlias=1
Text=[MonitorScale]
DynamicVariables=1
The drawback here, besides not knowing the exact formula for the taskbar height, is that the registry values are, as you can see, system dependent. For me, for example, if I change the scaling, then the value of the HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\AppliedDPI key stays the same, while it's the HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\BOE094A0_11_07E4_61^13B12C29BB6619B6E6B383B11D52D2EC\DpiValue and similar that change their values (where that long monitor ID is found in another place in the registry, see the PowerShell command above). Plus, as if this wasn't enough, the DPI "code" is dependent on the position in the scaling list from Settings and isn't a percentual value like you would expect, hence the need to "decode" it, which is obviously subject to what everyone has in his list from Settings... :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
lmiol
Posts: 18
Joined: April 6th, 2022, 5:36 pm

Re: HotKey plugin 1.0

Post by lmiol »

Yincognito and balala

thanks, you gave me a lot food for thought.
next week i will explore all of these
User avatar
balala
Rainmeter Sage
Posts: 16041
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HotKey plugin 1.0

Post by balala »

lmiol wrote: May 9th, 2023, 7:21 pm next week i will explore all of these
Alright, from my point of view. If you have any question related to what did I posted, feel to come back and ask.
User avatar
Yincognito
Rainmeter Sage
Posts: 6858
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HotKey plugin 1.0

Post by Yincognito »

lmiol wrote: May 9th, 2023, 7:21 pmnext week i will explore all of these
Good luck - hopefully you'll be able to use some of these to get closer to reaching your objective. :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth