Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1572

Help: Rainmeter Skins • Re: !setvariable help needed

$
0
0
The :5 worked for the best fit i chose 8.

i posted now 1 of the 11 objects. I think that iam almost finished, i have everything i want to see.
Not having all needed variables used in your code, we can't check yor skin out, however I have a few comments:
  • UpdateRate makes sense only on the parent WebParser measure. On child measures you don't have to use this option. You've added it to the [MeasureSite11] measure, where it is alright, this being the parent measure, but have added it to the [MeasurePrice11] and [MeasureProcentage11] measures as well, where they can't be used. In fact using it on those measures as well is not a problem, Rainmeter simply ignores it on both measures. But strictly speaking you should have remove them.
  • On both measures [MeasureProfitSign11] and [MeasurePercColor11], thereis a case which is not included in none of the two conditions: when the value of measures is 0. For instance these are the two conditions on the [MeasureProfitSign11] measure:

    Code:

    [MeasureProfitSign11]...IfBelowValue=0...IfAboveValue=0...
    But what if the value of the measure is exactly0? This case is not included in none of the above IfBelowValue and IfAboveValue options. You should have to add an IfEqualValue option as well, along with the corresponding IfEqualAction. But there is a much simpler solution as well: use IfCondition. In case of the [MeasureProfitSign11] measure, this might look this way, for example:

    Code:

    [MeasureProfitSign11]Measure=CalcFormula=MeasureProfit11IfCondition=(#CURRENTSECTION#<0)IfTrueAction=[!SetOption MeterProfit11 FontColor "#ColorDown#"][!SetOption "MeterProfitImage11" "ImageName" "#@#/Images/Down.png"][!UpdateMeter "MeterProfit11"][!UpdateMeter  "MeterProfitImage11"][!Redraw]IfFalseAction=[!SetOption MeterProfit11 FontColor "#ColorUp#"][!SetOption "MeterProfitImage11" "ImageName" "#@#/Images/Up.png"][!UpdateMeter "MeterProfit11"][!UpdateMeter  "MeterProfitImage11"][!Redraw]
    With this approach the case in which the value of the measure is exactly 0 is included into the IfFasleAction. If you want to include this case into the IfTrueAction option, just use the following IfCondition: IfCondition=(#CURRENTSECTION#<=0).
    In any case IfCondition is much more simple and much more powerful than the IfActions. Recommend to use IfConditions instead of IfActions.
  • See that in the above IfTrueAction and IfFalseAction options, I added two bangs, which were not used in your options. I talk about the [!UpdateMeter "MeterProfit11"] and [!UpdateMeter "MeterProfitImage11"] bangs. When you set some options with !SetOption bangs, a simple redraw of the skin (done by the [!Redraw] bang) makes no sense, because if you don't update the appropriate meters, the redraw is in vain. This is why I added these bangs.
I"m glad if you got the code working. Feel free to come back if any further question arises.

Statistics: Posted by balala — Today, 1:58 pm



Viewing all articles
Browse latest Browse all 1572

Trending Articles