chilio wrote:When I wrote #ImageActualWidth#, the skin wouldn't run anymore:
Code: Select all
; This was accepted
ImageActualWidth = ([FileWidth] > [FileHeight] ? #ImageWidth# : #ImageWidth#)
; While this wasn't
ImageActualWidth = ([FileWidth] > [FileHeight] ? #ImageWidth# : (#ImageHeight# / [FileHeight] * [FileWidth]))
Any ideas?
The ImageName option of both the [FileWidth] and [FileHeight] measure should be
ImageName=[color=#FF0000][[/color]MeterImage[color=#FF0000]][/color] (with brackets). This also requires to add to both measures, the
DynamicVariables=1 option.
Beside this, you can't define the ImageActualWidth and ImageActualHeight variables in the [Variables] section as you did, because they also would require setting the dynamic variables. But the [Variables] section (as same as the [Rainmeter] section) doesn't support dynamic variables. I'd probably create two Calc measures, then would use those measures, instead of the ImageActualWidth and ImageActualHeight variables:
Code: Select all
[MeasureImageActualWidth]
Measure=Calc
Formula=(( FileWidth > FileHeight ) ? #ImageWidth# : #ImageWidth# )
[MeasureImageActualHeight]
Measure=Calc
Formula= (( FileWidth > FileHeight ) ? #ImageWidth# : ( #ImageHeight# / FileHeight * FileWidth ))
Now replace the #ImageActualWidth# and #ImageActualHeight# variable values with [MeasureImageActualWidth] and [MeasureImageActualHeight] (or eventually MeasureImageActualWidth and MeasureImageActualHeight, if you're using them into formula option of some Calc measures or in IfCondition options).
Just one more observation: although this detail doesn't prevent the code to work well, [MeterImage] is in fact a measure. To avoid confusions, you should name it [MeasureImage].
I can't say more then this, because I don't know the whole code. If my solution doesn't solve your issue, please post the whole code of your skin.
Practically brackets aren't required around the name of the measures every time you're using them into Formula options of the Calc measures and into IfCondition options (also see above). In every other cases, they are required. Using them, also requires to add the
DyanmicVariables=1 option to the measure or meter where they are used.