Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1536

Help: Rainmeter Skins • Re: Skin help(HDR on off script)

$
0
0
Since my OP script didnt work properly(it always displayed HDR OFF no matter what), i settled on following script

Code:

# Run dxdiag command and capture the output in dxdiag_output.txtdxdiag /t "C:\Portable Apps\PortableApps\Rainmeter Portable\dxdiag_output.txt"# Wait for 6 seconds to ensure dxdiag has finished generating the output fileStart-Sleep -Seconds 6# Read the dxdiag output file$dxdiagContent = Get-Content -Path "C:\Portable Apps\PortableApps\Rainmeter Portable\dxdiag_output.txt" -Raw# Check if "AdvancedColorEnabled" is present in the outputif ($dxdiagContent -match "AdvancedColorEnabled") {    Write-Output "HDR ON"} else {    Write-Output "HDR OFF"}
This generates the "dxdiag" file, wait timer is there as generating a file might take a second or two, i just gave it some leeway so the skin shows proper text.
I then created a AutoHotkey script

Code:

#!b:: ; WIN+ALT+BRun, C:\Portable Apps\PortableApps\Rainmeter Portable\Rainmeter.exe !RefreshAppreturn
Hotkey is for toggling HDR in windows 11.

The code in skin is eclectic-tech one, which he kindly helped me with, i just had to use !Set variable in FinishAction as the Measure method didnt work for me. I then added a timer so it refreshes the skin once in a while, but since i have a hotkey its kinda pointless, at windows startup everything is refreshed anyway i believe so correct text would be shown either way.
I posted this for anyone, who would want this info in their skin in the future.
And again, thanks for all the help.

Statistics: Posted by BorisLFC — Today, 1:09 pm



Viewing all articles
Browse latest Browse all 1536

Trending Articles