It is currently March 28th, 2024, 9:59 pm

Refresh this skin every minute

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Refresh this skin every minute

Post by CodeCode »

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
[Strike]OnRefreshAction=[!Delay 100][!EnableMeasureGroup NUOL][/Strike]

@includeCtx=#SKINSPATH##JaxCore\Core\}{CtxItms.inc

[Variables]
@includeVars=#@#Vars.inc
Sec.Ctx.Left=1
Sec.Ctx.Center=1

@includeStyles=#@#Includes\GlobalStyles.inc
@includeClock=Styles\#Style#.inc

Code: Select all

[Rainmeter]
Update=60000
AccurateText=1
Group=ThisSkin
[Strike]OnUpdateAction=[!RefreshGroup ThisSkin]
OnRefreshAction=[!Delay 100][!EnableMeasureGroup NUOL][/Strike]

@includeCtx=#SKINSPATH##JaxCore\Core\}{CtxItms.inc

[Variables]
@includeVars=#@#Vars.inc
Sec.Ctx.Left=1
Sec.Ctx.Center=1
See if that helps out - I cant test it rn, so give it a go.
Just a bad idea. Crash infinite loop error.
Last edited by CodeCode on August 30th, 2021, 12:48 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Jax
Posts: 104
Joined: June 7th, 2021, 11:46 am

Re: Refresh this skin every minute

Post by Jax »

Harsh_Xeron wrote: August 30th, 2021, 5:07 am can someone please make this skin refresh evey minute
Hey, creator of the skin here, was wondering why would you like to have it refreshed every minute? :???:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refresh this skin every minute

Post by balala »

Harsh_Xeron wrote: August 30th, 2021, 5:07 am can someone please make this skin refresh evey minute
Besides CodeCode's codes (which to be honest I couldn't figure out how do the refreshes, but this is another question), I have a question: are you sure you have and want to do so regularly the refreshes? Because the refresh is a quite destructive operation and it should be avoided as much as possible.
However if you still would want to do those refreshes, theoretically you should add a measure like the following one to your code:

Code: Select all

[Variables]
...
RefreshInterval=60

[MeasureRefresh]
Measure=Calc
Formula=( COUNTER % #RefreshInterval# )
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!Refresh]
Note here the RefreshInterval variable, added to the [Variables] section. It is the number of seconds after which you would like to get the refreshes. Leave the existing variables and the @Include... options and add this variable as well.
Jax wrote: August 30th, 2021, 9:06 am Hey, creator of the skin here, was wondering why would you like to have it refreshed every minute? :???:
Good question!
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Refresh this skin every minute

Post by death.crafter »

balala wrote: August 30th, 2021, 9:18 am

Code: Select all

[Variables]
...
RefreshInterval=60

[MeasureRefresh]
Measure=Calc
Formula=( COUNTER % #RefreshInterval# )
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!Refresh]
Why complicate it?

Code: Select all

[Variables]
; In minutes
Interval=1

[Rainmeter]
OnRefreshAction=[!Delay (#Interval#*60000)][!Refresh]
from the Realm of Death
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Refresh this skin every minute

Post by CodeCode »

death.crafter wrote: August 30th, 2021, 10:58 am Why complicate it?

Code: Select all

[Variables]
; In minutes
Interval=1

[Rainmeter]
OnRefreshAction=[!Delay (#Interval#*60000)][!Refresh]
Oh, balala. I just used the regular skin update bumped it to 60000, and used OnUpdateAction, to do basically the exact thing you and death.crafter suggested. I know mine isnt as good, but my intentions were just to help.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refresh this skin every minute

Post by balala »

death.crafter wrote: August 30th, 2021, 10:58 am Why complicate it?
[/code]
Not necessary to complicate it. As usually more solutions available to the same question. Mine was one of them. Yours is another. Neither is better than the other, I think.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refresh this skin every minute

Post by balala »

CodeCode wrote: August 30th, 2021, 11:04 am Oh, balala. I just used the regular skin update bumped it to 60000, and used OnUpdateAction, to do basically the exact thing you and death.crafter suggested. I know mine isnt as good, but my intentions were just to help.
Have you tested your solution? Because it does hang up Rainmeter immediately. And this because when you refresh the skin, an update occurs immediately, which leads to a refresh, which leads to an update, which leads to a refresh... This way an endless loop occurs, hanging up Rainmeter.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Refresh this skin every minute

Post by CodeCode »

balala wrote: August 30th, 2021, 12:17 pm Have you tested your solution? Because it does hang up Rainmeter immediately. And this because when you refresh the skin, an update occurs immediately, which leads to a refresh, which leads to an update, which leads to a refresh... This way an endless loop occurs, hanging up Rainmeter.
:oops: :confused: :vomit:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refresh this skin every minute

Post by balala »

Harsh_Xeron wrote: August 31st, 2021, 2:22 am yes you got it right I got the same problem rainmeter stucks as it is stuck in a loop.
Do you mean when you applied CodeCode's solution?
Harsh_Xeron wrote: August 31st, 2021, 2:24 am Will it cause Lag every minute ?
Well, refreshing a skin, depending the skin as well might cause a lag. But as said this depends on the skin. My supposition is that your skin is not too complicated, so I'd say probably it won't cause lags. However the easiest way is to test it: add the described measure to your code, refresh the skin and follow if the lags are occurring. Are they?
User avatar
Jax
Posts: 104
Joined: June 7th, 2021, 11:46 am

Re: Refresh this skin every minute

Post by Jax »

Thanks! I will definitely add an option for updating the cham for the next version. Never expect someone to actually use slideshow :rolmfao: