Hi, I am having problems figuring out the If statement measures.
All I need is a measure that will check a variable and then depending execute a bunch of bangs.
This is what I have, however the guide doesn't say what to define the Measure as, or says where you indicate what variable to use. I was thinking that the Measure might be equal to the variable, and that could be how you show which variable you want to check, but it didn't work.
Any help would be great thanks.
"IfAction" is not a measure by itself. IfActions are options that can be added to other measures.
An "Action" is always paired with a "Value." IfAboveAction and IfAboveValue, IfEqualAction and IfEqualValue, etc.
Here's an example of a working measure with an IfAction. This measure would set a warning message when your CPU usage crosses above 90%, and a different message if it crosses below 10%.
[MeasureCPU]
Measure=CPU
IfAboveValue=90
IfAboveAction=!SetVariable "WarningMessage" "Your CPU usage is very high."
IfBelowValue=10
IfBelowAction=!SetVariable "WarningMessage" "Your CPU usage is very low."
WezzLee wrote:Also how does the if statement know which variable it is checking?
The IfAction are used with existing measures. They will compare the specified value with the measure's value. In Kaelri's example, the IfActions are checking against the value of the CPU measure.
If you don't understand, post your entire skin and tell us exactly what you want to do.
I won't post the entire thing because its something like 1500 lines, but here is what you need;
[Variables] - The variables I need the if statements to check.
Tab2=2
Tab3=1
Tab4=2
Tab6=1
[Tab2VariableCheck] - I have 4 of these, each checking a different variable and changing meters depending on which variable used. This Measure uses Tab2
Again, the "CPU" measure that I used was just an example. IfActions can be applied to any measure. The IfValue is compared to the value of the measure.
In this case, all you need is a Calc measure to check the variable. Something like this:
Okay, Well no more errors when I refresh the skin, thank god, but it still doesn't seem to check the variable with what you said. Lets say; 1 = IE, 2 = Chrome, 3 = Firefox. I have Tab2=3 at the moment, however when I refresh the skin IE will show instead. Just wondering why?
Kaelri wrote:Again, the "CPU" measure that I used was just an example. IfActions can be applied to any measure. The IfValue is compared to the value of the measure.
In this case, all you need is a Calc measure to check the variable. Something like this:
This seems wrong. You have multiple IfEqualValues and multiple IfAboveActions. Shouldn't it at least be IfEqualActions? And are multiple IfEqualActions supported? I thought there can only be one of each kind on a measure. See here: http://rainmeter.net/cms/Measures-IfActions