It is currently April 27th, 2024, 1:25 am

refresh weather skin 15 seconds after wakeup

Get help with creating, editing & fixing problems with skins
mcdermott2
Posts: 3
Joined: February 15th, 2014, 2:34 pm

refresh weather skin 15 seconds after wakeup

Post by mcdermott2 »

I would like my weather app to refresh 15 seconds after my computer wakes up.

I have been able to put together the following:
OnWakeAction=!Refresh

but can't figure out how to stagger the action by 15 seconds.

Thanks!
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: refresh weather skin 15 seconds after wakeup

Post by Mordasius »

Just out of interest, why would you want the weather skin to update 15 seconds after start-up?
mcdermott2
Posts: 3
Joined: February 15th, 2014, 2:34 pm

Re: refresh weather skin 15 seconds after wakeup

Post by mcdermott2 »

Mordasius wrote:Just out of interest, why would you want the weather skin to update 15 seconds after start-up?
My laptop doesn't always connect to the internet immediately on wakeup. Sometimes it takes a few seconds, and when this happens I have to manually refresh my weather app.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: refresh weather skin 15 seconds after wakeup

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
OnWakeAction=[!EnableMeasure MeasureDelay]

[Variables]
SecondsToDelay=14

[MeasureDelay]
Measure=Calc
Formula=MeasureDelay + 1
IfAboveValue=#SecondsToDelay#
IfAboveAction=[!Refresh]
Disabled=1
mcdermott2
Posts: 3
Joined: February 15th, 2014, 2:34 pm

Re: refresh weather skin 15 seconds after wakeup

Post by mcdermott2 »

Thank you, JSMorley, your code worked!
taiketsu8
Posts: 1
Joined: June 26th, 2022, 12:10 pm

Re: refresh weather skin 15 seconds after wakeup

Post by taiketsu8 »

Hi,

Noob question...how do I input this script?

Cheers
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: refresh weather skin 15 seconds after wakeup

Post by eclectic-tech »

taiketsu8 wrote: June 26th, 2022, 12:11 pm Hi,

Noob question...how do I input this script?

Cheers
Add the above code provided by JSMorley (copy/paste) into your weather skin, save the file.
Load/refresh your weather skin.

When your computer wakes, the weather skin will refresh after 15 seconds.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: refresh weather skin 15 seconds after wakeup

Post by balala »

taiketsu8 wrote: June 26th, 2022, 12:11 pm Noob question...how do I input this script?
Just to be a little bit more precise, I add to eclectic-tech's reply the followings:
  • Add the OnWakeAction option from jsmorley's post to your [Rainmeter] section. If there is no [Rainmeter] section (not too probably, but possible) add the jsmorley's section to the code. If on the other hand there is an OnWakeAction option in the [Rainmeter] section, just add the [!EnableMeasure MeasureDelay] bang to the existing option.
  • Add the SecondsToDelay variable to the [Variables] section, besides the existing variables. In most cases there should be such a section, but if there is not, just add jsmorely's one.
  • Finally add the [MeasureDelay] measure to the code.
When jsmorely posted his solution, back at the beginning of 2014, this was the only affordable solution, but in meantime a !Delay ban has been introduced. Using this bang should save adding a measure. So, instead of adding the [MeasureDelay] measure and the posted OnWakeAction option, just add the following option to the [Rainmeter] section: OnWakeAction=[!Delay "#SecondsToDelay#"][!Refresh] and add the SecondsToDelay variable to the [Variables] section. I think this is much easier this way.