It is currently May 8th, 2024, 1:58 am

Skin dissappearing after coming from sleepmode.

Get help with creating, editing & fixing problems with skins
Razgriz18
Posts: 12
Joined: January 24th, 2012, 6:35 pm

Skin dissappearing after coming from sleepmode.

Post by Razgriz18 »

Hi guys.

Though i'm quite a noob regarding Rainmeter, I was able to make my own theme by editing some existing skins. To complete it, I dicided to make my own small skin, it's nothing more that an image really.

Image

It's the small connection with the alienware logo on it. For some reason it keeps dissappearing, it mostly happens when I turn my laptop back on from sleep or especially hibernate mode. When I refresh it returns fine. I've done this refreshing for some time now, but it's beginning to annoy me. =p

I've tried different update rates but it's still happening. I don't know what too do really. It's probably something really simple, but I don't know what (as I said: noob). Please don't laugh too hard at my primitive coding ; )

Code: Select all

[Rainmeter]
Author=Razgriz18
Update=-1

[Metadata]
Name=AW
Information=Just a small image to complete my theme.
License=Free for all.
Version=1.0

[Variables]

[Image]
Meter=IMAGE
ImageName=#CURRENTPATH#\AWsmall3.png
X=0
Y=0
ImageTint=120,120,120,102
AntiAlias=1
Hidden=0
Help would be greatly appreciated.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Skin dissappearing after coming from sleepmode.

Post by Brian »

What different Update values have you tried?

An Update of -1 will mean the skin will load and never update, but since you are just using an image, that shouldn't be much of a problem. Did you try setting the Update to 1000?

-Brian
Razgriz18
Posts: 12
Joined: January 24th, 2012, 6:35 pm

Re: Skin dissappearing after coming from sleepmode.

Post by Razgriz18 »

Yes, I did. Even retested it with 1000 just now, to be sure. When coming from hibernate I had to refresh again.

Can't I make it to auto-refresh or something?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin dissappearing after coming from sleepmode.

Post by jsmorley »

I wonder if Rainmeter / that skin is being loaded from the memory image when you return from hibernate / sleep before your system sets up the location that the image file lives in, so it isn't initially able to find the file. Feels like a stretch, but that would explain the behavior I think.

Rainmeter also "caches" images so they are only loaded once. I wonder if hibernate / sleep is not dealing with that memory cache when Rainmeter is pulled back in from the memory dump.

Let me chew on how to work around these possibilities for a minute...
Razgriz18
Posts: 12
Joined: January 24th, 2012, 6:35 pm

Re: Skin dissappearing after coming from sleepmode.

Post by Razgriz18 »

Thanks, I almost always use hibernate instead of shutdown, to start up quicker when needed. Would be great if you could figure something out. : )
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin dissappearing after coming from sleepmode.

Post by jsmorley »

This is not a perfect solution, and would only be good for your simple skin really, but you might try:

Code: Select all

[Rainmeter]
Update=1000

[MeterMyImage]
Meter=Image
ImageName=SomeImage.png

[MeasureTimer]
Measure=Calc
Formula=((MeasureTimer % 60) + 1)
IfEqualValue=0
IfEqualAction=!Execute [!UpdateMeter MeterMyImage][!Redraw]
What this will do is refresh the meter every 60 seconds starting with second "0". So even though when you come back from hibernate Rainmeter isn't really "loaded", but is already running, it should do a refresh of the meter as soon as it loads, and then every 60 seconds thereafter.
Razgriz18
Posts: 12
Joined: January 24th, 2012, 6:35 pm

Re: Skin dissappearing after coming from sleepmode.

Post by Razgriz18 »

Thanks alot!
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin dissappearing after coming from sleepmode.

Post by jsmorley »

Razgriz18 wrote:Thanks alot!
Well, thank me after we see if it works for you. I can't really test.
Razgriz18
Posts: 12
Joined: January 24th, 2012, 6:35 pm

Re: Skin dissappearing after coming from sleepmode.

Post by Razgriz18 »

Restarted from hibernate 3 times now. It's working so far!

Anything else you recommend i'd test? The refreshing every 60 seconds doesn't cause a drop in performance or anything right, seeing it's just a simple image? Or should/could I set it to only check every hour or something, just in case?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin dissappearing after coming from sleepmode.

Post by jsmorley »

Razgriz18 wrote:Restarted from hibernate 3 times now. It's working so far!

Anything else you recommend i'd test? The refreshing every 60 seconds doesn't cause a drop in performance or anything right, seeing it's just a simple image? Or should/could I set it to only check every hour or something, just in case?
It should not have any real performance impact at all. However, you could try it with a bigger number. If an hour works, then push it to 86400, which is a day. My concern was that if the "counter" is in mid-stream, like at 30, and you hibernate and come back, it might still be at 30 and you would wait another 30 for it to get to 60, jump back to 0 and fire off. My hope was that when Rainmeter came back from hibernate, at least for the first "update" measures would start as "0", and this would work out. You might try it a few times and see if it consistently works. If so, then any number should be ok.