Windows 10 Home China 1803 64-bit (build 17134) - Chinese (Simplified) (2052)
We have found that there is one tip in the ImageName option that
When ImageName is hard-coded with an image file name, the image will be loaded and "cached", to avoid reloading the image from disk on every meter update. If there is an external process that is changing the image file, while leaving the name the same, use DynamicVariables=1 on the meter to force the image to be reloaded from disk on every meter update.
But in fact, not only the same name, when changing the image file to empty, the image do not be reloaded as well.
Lets look at the example below.
Code: Select all
[Rainmeter]
Update=5000
[Variables]
EmptyImage=
OriginImage=1.png
[Image]
Meter=Image
ImageName=#OriginImage#
W=200
[Button]
Meter=String
X=300
W=20
H=20
SolidColor=255,100,100
LeftMouseUpAction=[!SetOption Image ImageName "#EmptyImage#"][!Update]
Code: Select all
[Image]
Meter=Image
ImageName=#OriginImage#
W=200
DynamicVariables=1
Code: Select all
[Rainmeter]
Update=5000
[Variables]
Icon1=
Name1=Disk C
Path1=C:\
Icon2=2.png
Name2=Disk D
Path2=D:\
Icon3=3.png
Name3=Disk E
Path3=E:\
[Icon1]
Meter=Image
ImageName=#Icon1#
W=200
H=200
LeftMouseUpAction=["#Path1#"]
[Text1]
Meter=String
Y=200
FontColor=000000
FontSize=15
SolidColor=FFFFFF
Text=#Name1#
AntiAlias=1
[Icon2]
Meter=Image
ImageName=#Icon2#
X=210
W=200
H=200
LeftMouseUpAction=["#Path2#"]
[Text2]
Meter=String
X=r
Y=200
FontColor=000000
FontSize=15
SolidColor=FFFFFF
Text=#Name2#
AntiAlias=1
[NextPage]
Meter=String
Y=250
FontColor=FFFFFF
FontSize=15
SolidColor=255,100,100
Text=>
AntiAlias=1
LeftMouseUpAction=[!SetOption Icon1 ImageName "#Icon2#"][!SetOption Icon2 ImageName "#Icon3#"][!SetOption Icon1 LeftMouseUpAction """["#Path2#"]"""][!SetOption Icon2 LeftMouseUpAction """["#Path3#"]"""][!SetOption Text1 Text "#Name2#"][!SetOption Text2 Text "#Name3#"][!Update]
[PrePage]
Meter=String
X=100
Y=250
FontColor=FFFFFF
FontSize=15
SolidColor=0,0,255
Text=<
AntiAlias=1
LeftMouseUpAction=[!SetOption Icon1 ImageName "#Icon1#"][!SetOption Icon2 ImageName "#Icon2#"][!SetOption Icon1 LeftMouseUpAction """["#Path1#"]"""][!SetOption Icon2 LeftMouseUpAction """["#Path2#"]"""][!SetOption Text1 Text "#Name1#"][!SetOption Text2 Text "#Name2#"][!Update]
For some skins more complex, it can be a big problem like below.