It is currently March 29th, 2024, 12:55 pm

My skin executes its ifConditions even if not clicked

Get help with creating, editing & fixing problems with skins
vvs
Posts: 13
Joined: March 8th, 2018, 2:28 am

My skin executes its ifConditions even if not clicked

Post by vvs »

I have a button that when clicked, begins a timer with some ifConditions to execute at certain times. My issue is that even when I do not click the button, the ifConditions are still activating. Here's my code if anyone can help https://pastebin.com/91HnzHWU
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: My skin executes its ifConditions even if not clicked

Post by balala »

vvs wrote:I have a button that when clicked, begins a timer with some ifConditions to execute at certain times. My issue is that even when I do not click the button, the ifConditions are still activating. Here's my code if anyone can help https://pastebin.com/91HnzHWU
When you refresh / load the skin, the IfConditions are executed, unless you're disabling the measure. So, the only possibility to avoid this would be to disable the appropriate measure ([MeasureRemainingMinutes] in this case). For this, add a Disabled=1 option to it.
The result of this option is that nor the measure, nor its IfConditions aren't executed. Probably you have to re-enable it once you click the button. So add a [!EnableMeasure "MeasureRemainingMinutes"] bang beside the existing bangs of the LeftMouseUpAction option of the [MeterStartButton] meter.

Further observations:
  1. The !Rainmeter... bang prefix is deprecated. Remove all its occurrences.
  2. The !Hide bang (or in your code the !RainmeterHide bang), doesn't need both parameters, the config and the file. The config name is completely enough. So, for example the [![color=#FF0000]Rainmeter[/color]Hide "3hr" [color=#FF0000]"3hr.ini"[/color]] bang should have to be just [!Hide "3hr"].
  3. You've commented out two Meter=String options, in two meters ([MeterTimeStarted] and [MeterElapsedTime]). With this, you've leaved the appropriate section without a this kind of (otherwise vital) option. Without them, these meters don't work properly.
vvs
Posts: 13
Joined: March 8th, 2018, 2:28 am

Re: My skin executes its ifConditions even if not clicked

Post by vvs »

Awesome, thank you for the solution.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: My skin executes its ifConditions even if not clicked

Post by balala »

Glad to help.