I want to change an image displayed on background from "heart_battery.png" to "charging.png" only when my laptop is plugged in.
the .png files are in "C:\Users\(Username)\Documents\Rainmeter\Skins\Heart Pixel Battery\Shares\"
Last edited by balala on August 30th, 2021, 12:30 pm, edited 1 time in total.
Reason:Please use <code> tags whenever are posting code snippets. It's the </> button.
daniel1229 wrote: ↑August 30th, 2021, 12:29 pm
not working. what's wrong with the code? help me
There are more problems with the IfEqualAction and IfBelowAction options of the [MeasurePowerSource] measure:
The #SKINSPATH# variables are missing their last #. Add them back.
The used !SetVariable bangs are wrong. As you're using them they should be !SetOption bangs, but to modify a variable, the !SetVariable is required. This !SetVariable bang is requiring (usually) two parameters: the name of the variable you want to modify and the value you want to assign to the variable. Don't have to use the Variables section name.
See jsmorley's reply above, adding the DynamicVariables=1 option as he suggested.
Finally even if this is not a problem, redrawing a skin without updating the measures where the variable(s) is/are used makes no sense. Accordingly add the [!UpdateMeter "barFront"] bang next to [!Redraw]
Accordingly the [MeasurePowerSource] measure should look something like this:
balala wrote: ↑August 30th, 2021, 12:42 pm
There are more problems with the IfEqualAction and IfBelowAction options of the [MeasurePowerSource] measure:
The #SKINSPATH# variables are missing their last #. Add them back.
The used !SetVariable bangs are wrong. As you're using them they should be !SetOption bangs, but to modify a variable, the !SetVariable is required. This !SetVariable bang is requiring (usually) two parameters: the name of the variable you want to modify and the value you want to assign to the variable. Don't have to use the Variables section name.
See jsmorley's reply above, adding the DynamicVariables=1 option as he suggested.
Finally even if this is not a problem, redrawing a skin without updating the measures where the variable(s) is/are used makes no sense. Accordingly add the [!UpdateMeter "barFront"] bang next to [!Redraw]
Accordingly the [MeasurePowerSource] measure should look something like this: