It is currently October 12th, 2024, 3:51 am

OnWakeAction

Changes made during the Rainmeter 3.0 beta cycle.
User avatar
Brian
Developer
Posts: 2738
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: OnWakeAction

Post by Brian »

Hmmmm....this is interesting. Your log suggests something isn't defined correctly.

I see these type of messages:

Code: Select all

NOTE (07:04:47.056) testonwake\testonwake.ini: *** MW_POWERBROADCAST received. wParam=0x0012
NOTE (07:04:47.057) testonwake\testonwake.ini: *** OnWakeAction=[!Log "I just woke up!"]
NOTE (07:04:47.074) testonwake\testonwake.ini: I just woke up!
But, I do not see similar messages for the other skin. This might mean something is wrong with your OnWakeAction within your skin. Maybe a hidden character that isn't showing in the text editor, or maybe it is defined in the wrong place.

I also noticed that the OnWakeAction that did work didn't contain a !Refresh. The log message should have looked like this: NOTE (07:04:47.057) testonwake\testonwake.ini: *** OnWakeAction=[!Log "I just woke up!"][!Refresh]

So, hopefully to cover all my bases here, I made yet another test build. :D
https://builds.rainmeter.net/test_builds/Rainmeter-4.5.17.3723-prerelease-OnWakeAction4.exe

This time you can turn off "Debug mode". But you might want to still log this to a file, and post your results here again.

You should see a few more log messages. First, it will log the OnWakeAction for each skin when each skin is loaded. I also tweaked the logging when you resume from sleep mode. It should now log if the correct message is received from Windows and then log the OnWakeAction separately (the previous version only logged the Windows message only IF there was a OnWakeAction). There is also some extra logging in case the !Refresh bang fails (specifically the PostMessage part of it).

After you run this, please post your log here again (hopefully the last time).

Also, could you package your weather skin (maybe using the .rmskin packager) here, so that I can double check if your OnWakeAction is defined correctly or contains any hidden characters (or other weirdness)? You can remove any personal information before hand if you want.

Again, thank you for your help with this!
-Brian
User avatar
mercury52
Posts: 32
Joined: December 30th, 2011, 12:43 pm
Location: Maryland, USA

Re: OnWakeAction

Post by mercury52 »

Brian, I loaded the latest EXE file, loaded weather and test skins and logged results below. Also attached weather skin (let me know if it didn't work right).

Strange the weather skin does not have anything listed after the ONWAKEACTION.

Here is the log:
NOTE (16:03:41.008) : Rainmeter 4.5.17.3723 (64-bit) - OnWakeAction4
NOTE (16:03:41.009) : Language: English (1033)
NOTE (16:03:41.022) : Build time: 2023-07-24 11:50:25
NOTE (16:03:41.039) : Windows 10 Pro 22H2 (build 19045.3208) 64-bit - English (1033)
NOTE (16:03:41.056) : Path: C:\Program Files\Rainmeter\
NOTE (16:03:41.074) : SkinPath: C:\Users\mercu\Documents\Rainmeter\Skins\
NOTE (16:03:41.092) : SettingsPath: C:\Users\mercu\AppData\Roaming\Rainmeter\
NOTE (16:03:41.110) : IniFile: C:\Users\mercu\AppData\Roaming\Rainmeter\Rainmeter.ini
NOTE (16:03:58.805) testonwake\testonwake.ini: Refreshing skin
NOTE (16:03:58.809) testonwake\testonwake.ini: *** Read skin: OnWakeAction=[!log "I just woke up"][!Refresh]
NOTE (16:03:58.837) testonwake\testonwake.ini: *** RegisterSuspendResumeNotification returned: 0x7ee75450 (success)
NOTE (16:04:03.599) Dock Laptop Weather\Dock Laptop Weather.ini: Refreshing skin
NOTE (16:04:04.024) Dock Laptop Weather\Dock Laptop Weather.ini: *** Read skin: OnWakeAction=
NOTE (16:04:04.254) Dock Laptop Weather\Dock Laptop Weather.ini: *** RegisterSuspendResumeNotification returned: 0x04188200 (success)

Here is the weather skin:
[attachment=0]dock laptop weather_.rmskin[/attachment]
You do not have the required permissions to view the files attached to this post.
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: OnWakeAction

Post by Jeff »

mercury52 wrote: July 24th, 2023, 8:37 pm Here is the weather skin:
dock laptop weather_.rmskin
https://imgur.com/QPSB9eM

Could be that OnWakeAction is a [Rainmeter] option and not a [Metadata] option
User avatar
Brian
Developer
Posts: 2738
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: OnWakeAction

Post by Brian »

Ok, I see the reason immediately.

In your weather skin, your OnWakeAction is not in the [Rainmeter] section, it is in the [Metadata] section.

Here is the beginning of each skin:
Dock Laptop Weather.ini :

Code: Select all

 ;start Dock Laptop Weather skin 2023-07-24

[Rainmeter]
Background=#@#BackgroundDockLaptopWeather.png
[Metadata]
NAME=Dock Laptop Weather
AUTHOR=mercury52
INFORMATION=Displays weatherusing weather.com (use with Dock Laptop skin)
Creative Commons Attribution-Non-Commercial-Share Alike 3.0
VERSION=1.0
PREVIEW=#@#mydesktop.jpg

OnWakeAction=[!log "I just woke up"][!Refresh]
Dock Laptop Weather - Copy.ini :

Code: Select all

 ;start Dock Laptop Weather skin 2023-07-24

[Rainmeter]
Background=#@#BackgroundDockLaptopWeather.png
[Metadata]
NAME=Dock Laptop Weather
AUTHOR=mercury52
INFORMATION=Displays weatherusing weather.com (use with Dock Laptop skin)
Creative Commons Attribution-Non-Commercial-Share Alike 3.0
VERSION=1.0
PREVIEW=#@#mydesktop.jpg

; The parsing of the weather.com website in the various @Inlcude .inc files is a collaborative effort of:
; OnyxBlack, Xenium, SilverAzide and myself. All credit to these authors. Thanks!

OnWakeAction=[!log "Just woke up-weather"][!Refresh]
;OnWakeAction=[!SetOption MeterString Text "60 seconds to Refresh"][!log "60 seconds to Refresh"][!Delay 60000][!Refresh]

The OnWakeAction's need to be placed under the [Rainmeter] section for them to work.

Try that, and report back if it starts working. You may want to install the regular release Rainmeter version to see if it was working all along.

-Brian
Edit: Jeff beat me to it!
User avatar
Yincognito
Rainmeter Sage
Posts: 8421
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: OnWakeAction

Post by Yincognito »

Brian wrote: July 24th, 2023, 9:09 pmYou may want to install the regular release Rainmeter version to see if it was working all along.
According to this, it won't. Looks like your modifications did move things in the right direction... :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
mercury52
Posts: 32
Joined: December 30th, 2011, 12:43 pm
Location: Maryland, USA

Re: OnWakeAction

Post by mercury52 »

Boy, it was right in front of my eyes and I never saw it. At least now I know. I may have never figured it out.

Moving it to the Rainmeter section did the trick. It worked. BUT, after reinstalling the current version of Rainmeter it does not work. Whatever you did in those test builds fixed the problem.

I want to thank everyone for all the help.
User avatar
Brian
Developer
Posts: 2738
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: OnWakeAction

Post by Brian »

mercury52 wrote: July 24th, 2023, 11:42 pm Whatever you did in those test builds fixed the problem.
Awesome! I will tweak this a bit, remove the extra logging, and it should be in the next release!

Thanks for all the testing!

-Brian