Page 1 of 4

OnWakeAction

Posted: April 28th, 2013, 5:20 pm
by jsmorley
We have added a new action option in the [Rainmeter] section of skins:

OnWakeAction
Action to execute when Windows returns from the sleep or hibernate states.

http://docs.rainmeter.net/manual-beta/skins/rainmeter-section#OnWakeAction

Re: OnWakeAction

Posted: February 5th, 2020, 2:35 pm
by QuakeGuy
Sorry for bumping this old thread, but i have a question. I want my skin do a complete refresh, when you come back to your machine. My code:

OnWakeAction=[!Refresh]

But when i come back, it shows everything defined in OnConnectErrorAction for the webparser measure. It works normally after x minutes, when UpdateRate is reached again. I am curious about this. :(

Re: OnWakeAction

Posted: February 5th, 2020, 2:50 pm
by jsmorley
QuakeGuy wrote: February 5th, 2020, 2:35 pm Sorry for bumping this old thread, but i have a question. I want my skin do a complete refresh, when you come back to your machine. My code:

OnWakeAction=[!Refresh]

But when i come back, it shows everything defined in OnConnectErrorAction for the webparser measure. It works normally after x minutes, when UpdateRate is reached again. I am curious about this. :(
While I can't be sure, it seems to me that when your system "wakes up", Rainmeter is kicking in before your network infrastructure is fully stood up. You might look at delaying the refresh for some number of seconds after you wake up.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnWakeAction=[!SetOption MeterString Text "10 seconds to Refresh"][!Delay 10000][!Refresh]

[MeterString]
Meter=String
FontSize=20
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
You can play with the amount of time in [!Delay 10000] to find something that is reliable for you.

Re: OnWakeAction

Posted: February 5th, 2020, 3:04 pm
by jsmorley
To be honest, using !Refresh feels a bit brute-force to me, although it may be appropriate in some circumstances.

Why not have the OnWakeAction wait some number of seconds, then simply [!CommandMeasure WebParserParentMeasure "Update"]

Going to be a lot less visibly "jarring" than refreshing the entire skin.

Re: OnWakeAction

Posted: February 5th, 2020, 3:33 pm
by QuakeGuy
Wow, fast reply. Thanks JSMorley. Btw i am new here, maybe its not the right section, "Help: Rainmeter Skins" would be better?

To my problem: OnWakeAction=[!Delay 5000][!Refresh] would easily fix this. I will test it.
The described problem occurs on my desktop pc. When i use my Surface nothing happens at all. It shows still the values of the last update, when i switched off.

Re: OnWakeAction

Posted: February 5th, 2020, 3:37 pm
by jsmorley
QuakeGuy wrote: February 5th, 2020, 3:33 pm Wow, fast reply. Thanks JSMorley. Btw i am new here, maybe its not the right section, "Help: Rainmeter Skins" would be better?

To my problem: OnWakeAction=[!Delay 5000][!Refresh] would easily fix this. I will test it.
The described problem occurs on my desktop pc. When i use my Surface nothing happens at all. It shows still the values of the last update, when i switched off.
Either place is ok for this question.

Re: OnWakeAction

Posted: February 5th, 2020, 4:01 pm
by QuakeGuy
Fine. The [!Delay 5000] does the trick. ;-)

Your are right, i maybe can directly update the measure. But i had no visual problems so far, because everything were always processed when i see my desktop.

The problem with my Surface still exists. I have no other laptop to test. Maybe OnWakeAction does'nt work here? I use the current Windows 10 Home on it.

Re: OnWakeAction

Posted: February 5th, 2020, 4:05 pm
by jsmorley
QuakeGuy wrote: February 5th, 2020, 4:01 pm Fine. The [!Delay 5000] does the trick. ;-)

Your are right, i maybe can directly update the measure. But i had no visual problems so far, because everything were always processed when i see my desktop.

The problem with my Surface still exists. I have no other laptop to test. Maybe OnWakeAction does'nt work here? I use the current Windows 10 Home on it.
I don't know, I don't have any experience with Windows Surface.

Re: OnWakeAction

Posted: February 5th, 2020, 4:19 pm
by QuakeGuy
Ok. Has anybody here a Microsoft Surface and can test the OnWakeAction?

Re: OnWakeAction

Posted: February 5th, 2020, 6:12 pm
by QuakeGuy
@JSMorley: I think it would be wise to move this thread or start a new one, so anybody can find it.

I noticed one difference:
The Rainmeter log at my Surface states something, that my desktop does not. But not every time!

System: "Show open windows" has been detected.
System: "Show desktop" has been detected.