It is currently June 26th, 2019, 2:52 pm

Update not working

Help with creating, editing & fixing problems with skins
Posts: 2
Joined: January 7th, 2019, 1:55 am

Update not working

Alpaga » January 7th, 2019, 2:03 am


I try to dev a simple skin which display a simple image on my desktop but this image change each 6 seconds so I would like than my skin has to be update each 6 seconds but that not working.
My skin:

Code: Select all


License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


If someone now why :) ?

User avatar
Posts: 19272
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Update not working

jsmorley » January 7th, 2019, 3:28 am

Rainmeter "caches" images when they have a specific name, so that they are not loaded from disk on each update of the meter. If you are externally changing the image, but keeping the file name the same, you can simply do:

Code: Select all


Note the DynamicVariables=1, that is the key to having it ignore the cached version each time the meter is updated. Now, also note that I don't use the Update option in [Rainmeter] to drive this, as although the image changes every 6 seconds, when it DOES change, you want that to be reflected immediately, and not another 6 seconds later. So have the skin update once a second, and have UpdateDivider=6 on the meter, so it only gets the image every 6 seconds.

My rule of thumb is "never increase the value of Update above 1000". Using Update to "slow down" how often anything is done can only lead to "lag" between the time some value is obtained or reached, and when the skin reacts to it. Leave Update at 1000, (or less in some cases) and then use UpdateDivider anywhere and everywhere you need to slow things down from once a second.

To be honest, I would probably have it check every 5 seconds, not 6. Since this is asynchronous, I would ask for the image a bit more often than it is changed, just to avoid accidentally getting the time "sync'd up" and ending up always one image "behind".

The only way to be absolutely certain of the timing, so you get a new, different image exactly every 6 seconds, would be to set UpdateDivider=-1 on the meter, so it is NEVER updated after the first time, and then have whatever node.js process is creating the image send an !UpdateMeter bang to the meter/skin and a !Redraw to the skin from the command line. Then you are in a synchronous "on demand" method. That assumes you have the ability to do that with whatever is creating the images...

The command line will look something like:

"C:\Program Files\Rainmeter\Rainmeter.exe" [!UpdateMeter MeterImage "ConfigName"][!Redraw "ConfigName"]

That is the really correct way to do this if at all possible. It is far more desirable to have the process creating the image say "Hey, I just created it, come get it!".

Than to have the skin saying "Are we there yet? Are we there yet? Are we there yet".

Posts: 2
Joined: January 7th, 2019, 1:55 am

Re: Update not working

Alpaga » January 7th, 2019, 1:02 pm

Ok I see tks for your help !!