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

Help: Rainmeter Skins • Re: Check if variable exists and open skin

$
0
0
Thanks for your quick response, I wasn't expecting it on a weekend :)

I can confirm there would only be numeric values, I would have that variable set as 0 initially and then updates to 1 once a selection has been made and these would be the only variable options. As soon as you mentioned the variable I declared I realised I should have stated this was only there to rule out issues not reading from the variable file as expected and this would have been removed once I worked out the bigger issue I am having but thanks for reminding me of it.

I had seen the IfCondition used in measures but thought I may be able to do the check without the need for a measure but if that is the correct way then I understand what is needed to correct that side of things.

Well spotted on the mistake. I triple checked before sending and still got it wrong! It should have been if variable is 0 then open settings so I will update the original post for clarity if possible.

I will remove the code and see how much further I can get with this help. Thanks again :)
Sure thing. Here's the code with an equivalent Calc measure (this assumes that the UsedBefore variable is declared in one of your @includes, so, given that the variable is presumably also used in Settings.ini, such an @include should be part of both your main skin and the settings one - not sure your DriverVariables.inc does that):

Code:

[Variables]@include=#@#DriverVariables.inc[Check]Measure=CalcFormula=#UsedBefore#UpdateDivider=-1IfCondition=([Check]=0)IfTrueAction=[!ActivateConfig "GeorgeRussell" "Settings.ini"]DynamicVariables=1
The above updates [Check] only once, due to its negative UpdateDivider, so it's suited for checking things only when the main skin is loaded or refreshed.

Statistics: Posted by Yincognito — Today, 2:08 pm



Viewing all articles
Browse latest Browse all 712

Trending Articles