It is currently March 28th, 2024, 11:30 pm

reloading an image

Get help with creating, editing & fixing problems with skins
chansen006
Posts: 2
Joined: January 26th, 2018, 4:45 pm

reloading an image

Post by chansen006 »

I currently have an image that re uploads via FTP to my machine. I would like to get this image to refresh every 2 sec.

Code: Select all

[Rainmeter]

Update=2000

[METADATA]
Name=ipcam?
Author=Chris

[metershowpicture]
Meter=Image
ImageName=D:\DCS-932L.jpg

Simple i know, but i have not been able to figure this out. :17angry
Last edited by chansen006 on January 26th, 2018, 5:17 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: reloading an image

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterImage]
Meter=Image
ImageName=#@#myImage.png
UpdateDivider=2
DynamicVariables=1
The DynamicVariables=1 will cause it not to "cache" the image, and will respond to changes to it.
chansen006
Posts: 2
Joined: January 26th, 2018, 4:45 pm

Re: reloading an image

Post by chansen006 »

UGH, so simple, yet......

Thanks, works great.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: reloading an image

Post by jsmorley »

chansen006 wrote:UGH, so simple, yet......

Thanks, works great.
Glad to help.

It's not terribly intuitive why this works, I probably need to add something to the docs about it. The deal is that when you hard-code an ImageName on an Image meter, it will load it and "cache" it, to save on reloading the same image over and over and over on every meter update. Doing that on every Image meter would be a relatively large and pointless hit on the CPU. If on the other hand you set DynamicVariables=1 on the meter, then it will fully resolve all option values on every meter update, including loading the image.While you wouldn't want this on static images, when something is changing the image behind the scenes, leaving the file name the same, this is how you address it.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: reloading an image

Post by jsmorley »