It is currently October 15th, 2019, 9:53 am

Rainmeter wallpaper problems

Help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3568
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » August 17th, 2019, 3:22 am

sockeater wrote:
August 17th, 2019, 1:01 am
I apologize for the double post but I restarted my computer and the rainmeter skin is behaving differently. It seems to change the layout multiple times like I mentioned but it seems to be within the 5 second period from the if condition. How do I make it so that the action only triggers once within the 5 seconds?

Edit: Could I possibly replace IfTrueAction with IfEqualAction? would that allow my action to be triggered once?
You need to add a delay of 5 seconds (5000 milliseconds) when the IfCondition is met. This will delay loading the new layout until 5 more seconds have past and prevents the measure from triggering again.

So to every IfTrueAction add [!Delay 5000].

IfTrueAction=[!UpdateMeasure mRandom][!Delay 5000][!LoadLayout "b[mRandom]"]
sockeater
Posts: 17
Joined: July 30th, 2019, 2:43 pm

Re: Rainmeter wallpaper problems

sockeater » August 17th, 2019, 3:45 am

eclectic-tech wrote:
August 17th, 2019, 3:22 am
You need to add a delay of 5 seconds (5000 milliseconds) when the IfCondition is met. This will delay loading the new layout until 5 more seconds have past and prevents the measure from triggering again.

So to every IfTrueAction add [!Delay 5000].

IfTrueAction=[!UpdateMeasure mRandom][!Delay 5000][!LoadLayout "b[mRandom]"]
Thank you very much eclectic. I will give this a shot!
I want to know if I understand the line of code correctly:
The reason why this works is because when the condition is met, my mRandom will then select a random number and then delay for 5 seconds and THEN load the layout based on the number. Whereas if I were to put [!Delay 5000] after [!LoadLayout "b[mRandom]"], then it would not fix anything because it will pick a random number and load the layout for seconds and then delay for 5 seconds(which does nothing in this case). Are my assumptions correct?

Edit: The Delay function is perfect. Makes the skin work like a charm. Many thanks eclectic :bow:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3568
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » August 17th, 2019, 3:35 pm

Yes, you understood correctly; the delay needs to be after the condition is met and before you load the layout.

Happy to help, glad you got it working! :great: