mak_kawa wrote:My simple try...
Code: Select all
[MeasureTime]
Measure=Time
Format=%#m
Substitute="1":"kalen 1.jpg","2":"kalen 2.jpg","3":"kalen 3.jpg","4":"kalen 4.jpg","5":"kalen 5.jpg","6":"kalen 6.jpg","7":"kalen 7.jpg", "8":"kalen 8.jpg","9":"kalen 9.jpg","10":"kalen 10.jpg", "11":"kalen 11.jpg","12":"kalen 12.jpg"
[MeterDay]
Meter=Image
MeasureName=MeasureTime
The substitution solution can definitely work, but not this way (sorry mak_kawa). The problem is that those substitutions are made in order. So, eg In November, when the [MeasureTime] returns 11, in the order of the substitutions the 1 is before 11, so both 1s will be substituted by the kalen 1.jpg image, and the substituted value of the measure will look, instead of what it should have to be (kalen 11.jpg), like kalen 1.jpgkalen 1.jpg (both digits 1 substituted by kalen 1.jpg).
In such cases you have to use the regular expression substitution. Replace the posted Substitute option with the following two:
Code: Select all
[MeasureTime]
Measure=Time
Format=%#m
RegExpSubstitute=1
Substitute="^1$":"kalen 1.jpg","^2$":"kalen 2.jpg","^3$":"kalen 3.jpg","^4$":"kalen 4.jpg","^5$":"kalen 5.jpg","^6$":"kalen 6.jpg","^7$":"kalen 7.jpg", "^8$":"kalen 8.jpg","^9$":"kalen 9.jpg","^10$":"kalen 10.jpg", "^11$":"kalen 11.jpg","^12$":"kalen 12.jpg"
In this case the substitutions are made only if the whole value returned by the measure is 1, 2 and so on, accordingly.