Toggle between Power Options and variable meter image
Posted: December 3rd, 2017, 7:09 am
Hey all
I'm fairly new to Rainmeter, and I have some experience coding so I've been trying to learn what I can to do this myself. I've spent a fair amount of time today trying to figure out how to do this but I'm not coming up with a proper solution. Hope you can help or point me in the right direction.
What I'd like to do, is have a clickable meter image that will toggle through power options using LeftMouseUpAction. I found a script that will change the meter image when I toggle "High Performance" and "Balanced" power options, but I have to toggle these options manually within Windows. Here's that bit of code:
I know that I can use LeftMouseUpAction to set a single power option (say High Performance) on click, but is there any way to have a second option (Balanced) available? I've seen that conditionals like IF are only available for Measures; I tried coming up with a way to use that but I couldn't get anything to work. I was thinking to use a variable somehow, but I can't find documentation on how to use a variable with a !Execute command.
Additionally...would there be a way to toggle between THREE options? Ideally, I'd like to be able to toggle between High Performance -> Balanced -> Power Saver, but I'll settle for just two if I have to.
Thanks in advance.
I'm fairly new to Rainmeter, and I have some experience coding so I've been trying to learn what I can to do this myself. I've spent a fair amount of time today trying to figure out how to do this but I'm not coming up with a proper solution. Hope you can help or point me in the right direction.
What I'd like to do, is have a clickable meter image that will toggle through power options using LeftMouseUpAction. I found a script that will change the meter image when I toggle "High Performance" and "Balanced" power options, but I have to toggle these options manually within Windows. Here's that bit of code:
Code: Select all
.
.
[Variables]
high=neon-mountains-bottom-power-HIGH.png
balance=neon-mountains-bottom-power-ON.png
Back=[MeasureActivePower]
...
[MeasureActivePower]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SYSTEM\ControlSet001\Control\Power\User\PowerSchemes
RegValue=ActivePowerScheme
Substitute="8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c":"#high#","381b4222-f694-41f0-9685-ff5bb260df2e":"#balance#"
DynamicVariables=1
.
.
Additionally...would there be a way to toggle between THREE options? Ideally, I'd like to be able to toggle between High Performance -> Balanced -> Power Saver, but I'll settle for just two if I have to.
Thanks in advance.