It's hard to explain my problem, so the best would be to create a new skin with this code
(Important: You have to edit ImageName to any Wallpaper on your system)
Code: Select all
[Rainmeter]
Author=
Update=100
DynamicWindowSize=1
[Metadata]
Name=
Version=0
Information=
License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
[Background]
Meter=Image
SolidColor=100,100,100,100
X=0
Y=0
W=800
H=600
DynamicVariables=1
;;====================================================
;; Measures
;;====================================================
[cCounter]
Measure=Calc
Formula=(cCounter+1)%100
[cOpen]
Measure=Calc
Formula=[cCounter]/100
DynamicVariables=1
IfAboveValue=0.98
IfAboveAction=[!EnableMeasureGroup Close][!SetOption "Image1" "TransformationMatrix" "[cClose];0;0;1;[cCloseX];0" "#CURRENTCONFIG#"][!DisableMeasureGroup Open]
Group=Open
[cOpenX]
Measure=Calc
Formula=(1-([cCounter]/100))*400
DynamicVariables=1
Group=Open
[cClose]
Measure=Calc
Formula=(1-([cCounter]/100))
DynamicVariables=1
Group=Close
Disabled=1
[cCloseX]
Measure=Calc
Formula=([cCounter]/100)*400
DynamicVariables=1
Group=Close
Disabled=1
;;====================================================
;; Meters
;;====================================================
[Image1]
Meter=Image
ImageName=...
Y=0
W=400
H=250
DynamicVariables=1
PreserveAspectRatio=2
TransformationMatrix=[cOpen];0;0;1;[cOpenX];0
[Image2]
Meter=Image
ImageName=...
X=200
Y=R
W=400
H=250
Hidden=0
DynamicVariables=1
PreserveAspectRatio=2
TransformationMatrix=[cClose];0;0;1;[cCloseX];0
It should "open" (increase the Width with TransformationMatrix) Image1 and when Image1 is normal (normal Width) it should "close" (decrease the Width with TransformationMatrix).
At the moment when Image1 is "normal" the bang will be fired.
Code: Select all
IfAboveAction=[!EnableMeasureGroup Close][!SetOption "Image1" "TransformationMatrix" "[cClose];0;0;1;[cCloseX];0" "#CURRENTCONFIG#"][!DisableMeasureGroup Open]
As I said you don't have to know how TransformationMatrix works, I added an Image2 (for control purpose).
So after the bang, Image1 and Image2 have the same TransformationMatrix code, but only Image2 is "closing".
What could be the problem?
The bang works, because if we change the bang to
Code: Select all
IfAboveAction=[!EnableMeasureGroup Close][!SetOption "Image1" "TransformationMatrix" "2;0;0;1;0;0" "#CURRENTCONFIG#"][!DisableMeasureGroup Open]
---
I found one thing that is strange, and that's why I'm thinking this whole thing isn't really dynamic.
When we delete [!DisableMeasureGroup Open] in the bang, the "Open-Counters" counting further.
The second time when the bang will be fired then Image1 change his Width to a very small amount, that's because of the code (at the fire-moment the "Close-Counters" are almost 0), so maybe the TransformationMatrix works only when the bang will be fired = TransformationMatrix is not dynamic in this case)
[The first time when the bang will be fired the "Close-Counters" are disabled -> value=0 and TransformationMatrix=0;0;0;1;0;0 that means the image is just normal]
But the best would be to try it because it's hard to explain.
---
So maybe someone has some minutes time to look at this thing, because I absolute have no idea why this isn't working.