It is currently September 18th, 2024, 1:24 pm

Help to assemble a formula

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16552
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 15th, 2023, 2:10 pm Even after adding it, it still doesn't work, the active skin check does not update when I change pages, I give you the complete code if you want to try it
You had an extremely long discussion with Yincognito, which I can't follow entirely, so maybe I've missed something in meantime. However I have a comment and a question, relative to your skin.
  • Comment: There are a few (two it seems, to be precise) files which are used into the attached code, but which I don't have. I assume they were added after you uploaded the last full package, so maybe these are something related to my below question.
  • Question: Since I didn't read all your discussion with Yincognito (the discussion being extremely long), I'm not sure what do you mean by "change pages". What do you mean? I think I know some tabs should exist in your skin, but when applied the above code, I got only the following skin:
    Settings.png
    Where (or what) are the "pages, how do I "change" them?"
Sorry I couldn't follow all your discussion...
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

balala wrote: September 15th, 2023, 2:58 pm You had an extremely long discussion with Yincognito, which I can't follow entirely, so maybe I've missed something in meantime. However I have a comment and a question, relative to your skin.
  • Comment: There are a few (two it seems, to be precise) files which are used into the attached code, but which I don't have. I assume they were added after you uploaded the last full package, so maybe these are something related to my below question.
  • Question: Since I didn't read all your discussion with Yincognito (the discussion being extremely long), I'm not sure what do you mean by "change pages". What do you mean? I think I know some tabs should exist in your skin, but when applied the above code, I got only the following skin:
    Settings.png
    Where (or what) are the "pages, how do I "change" them?"
Sorry I couldn't follow all your discussion...
Yeah, he didn't post the arrow images. Here are two basic replacements that I downloaded from the internet and photoshopped a bit to 32x32 pixels, copy them to the ...\@AL\@Resources\Images\Settings folder:
Anterior.png
Siguiente.png
Result - notice the rundimentar arrow replacement image at bottom left:
Ajustes.jpg
Now you can switch tabs. The opposite arrow will appear at bottom right after switching.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16552
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 15th, 2023, 2:10 pm Even after adding it, it still doesn't work, the active skin check does not update when I change pages, I give you the complete code if you want to try it
After getting Yincognito's images and adding them to the right place, I got it working, accordingly to how the code is written (at least as far as I can tell).
The [MeasureActive1] measure for instance is returning the state of skin of the @Al\Planetas\Luna config. The IfTrueAction / IfFalseAction are executed accordingly. If I change the page, the measure is still returning the proper case and executing the appropriate option, from IfTrueAction and IfFalseAction.
Maybe I'm still missing something, but I think these measures are working well.
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

balala wrote: September 15th, 2023, 4:32 pmMaybe I'm still missing something, but I think these measures are working well.
It's the behavior that is not the expected one. Example:
- you load the Ajustes skin, starting by default on the page with the moon icon (page 1)
- the Luna skin is unloaded by default
- in Ajustes, you navigate to the crowded page (page 2)
- since the Luna skin is unloaded, the color meters corresponding to Luna under Colores Graficos on the right should be hidden, but they are not
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

arcanosa84 wrote: September 15th, 2023, 2:10 pm Even after adding it, it still doesn't work, the active skin check does not update when I change pages
The answer is in the manual, on the IfCondition page (that will add an extra redraw at each update of the skin, but it will work). The issue was that due to how IfCondition works by default, even though the individual MeasureActive1 and Pagina tests changed in the condition, the aggregate (overall) test in the condition did not change to TRUE before becoming FALSE again in order to trigger the execution of the bangs, in some navigation cases. So, for example, if you take a look at these logical operations table:
- when Ajustes initially loads, if the Luna skin is unloaded and Pagina is 1:
(MeasureActive1 = 1) && (#Pagina# = 2) = FALSE && FALSE = FALSE = IfFalseAction runs, because of the initial skin update that updates the measure
- when navigating to page 2, if the Luna skin is unloaded and Pagina becomes 2:
(MeasureActive1 = 1) && (#Pagina# = 2) = FALSE && TRUE = FALSE = no action will run, since the overall test result did not change (went from FALSE to FALSE)

Maybe balala can explain this better, or provide a solution that avoids the extra redraw on each measure update. :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16552
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

Yincognito wrote: September 15th, 2023, 4:45 pm It's the behavior that is not the expected one. Example:
- you load the Ajustes skin, starting by default on the page with the moon icon (page 1)
- the Luna skin is unloaded by default
- in Ajustes, you navigate to the crowded page (page 2)
- since the Luna skin is unloaded, the color meters corresponding to Luna under Colores Graficos on the right should be hidden, but they are not
I see. This way makes sense and now I see the issue.
Simpler solution: You have to add an IfConditionMode=1 option to the [MeasureActive1] measure. Along with this, I most probably would remove the [!UpdateMeter *][!Redraw] bangs from both, the IfTrueAction and IfFalseAction options.
There might be another solution as well, which doesn't require to set the IfConditionMode option, but I have to check before posting.
User avatar
balala
Rainmeter Sage
Posts: 16552
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

balala wrote: September 15th, 2023, 5:29 pm but I have to check before posting.
Ok, I did. Here is the other solution, which doesn't require the IfConditionMode=1 option (which even if in some cases can be a good solution, many times should be avoided).
Using the original (not-altered) measure, add the following bangs to the LeftMouseUpAction options of the [CambiodePaginaSig] and [CambiodePaginaAnt] meters: [!DisableMeasure "MeasureActive1"][!UpdateMeasure "MeasureActive1"][!EnableMeasure "MeasureActive1"].
Something like this:

Code: Select all

[CambiodePaginaSig]
...
LeftMouseUpAction=[!DisableMeasure "MeasureActive1"][!UpdateMeasure "MeasureActive1"][!EnableMeasure "MeasureActive1"][!HideMeterGroup Pag1][!ShowMeterGroup Pag2][!ShowMeter "CambiodePaginaAnt"][!HideMeter "CambiodePaginaSig"][!SetVariable Pagina 2][!UpdateMeasureGroup Comp][!UpdateMeter *][!Redraw]
...

[CambiodePaginaAnt]
...
LeftMouseUpAction=[!DisableMeasure "MeasureActive1"][!UpdateMeasure "MeasureActive1"][!EnableMeasure "MeasureActive1"][!HideMeterGroup Pag2][!ShowMeterGroup Pag1][!ShowMeter "CambiodePaginaSig"][!HideMeter "CambiodePaginaAnt"][!SetVariable Pagina 1][!UpdateMeasureGroup Comp][!UpdateMeter *][!Redraw]
...
With these bangs, when you change the "page", the [MeasureActive1] measure is disabled, updated, then immediately re-enabled, which leads to get executing the appropriate option from the IfTrueAction or IfFalseAction.
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

balala wrote: September 15th, 2023, 5:29 pmYou have to add an IfConditionMode=1 option to the [MeasureActive1] measure.
I already hinted at that with the link I mentioned before your reply - the idea was to let the OP figure out the obvious by looking at that page. :D
Anyway, you saying this directly will probably save time avoiding any likely confusion, so it's ok.
balala wrote: September 15th, 2023, 5:51 pm Here is the other solution, which doesn't require the IfConditionMode=1 option (which even if in some cases can be a good solution, many times should be avoided).
Thanks for providing it, it makes sense. I was thinking at breaking the condition into multiple ones, but I believe your choice is way better. :thumbup:
Now it's up for the OP to test these advices.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16552
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

Yincognito wrote: September 15th, 2023, 6:20 pm I already hinted at that with the link I mentioned before your reply - the idea was to let the OP figure out the obvious by looking at that page. :D
Sorry, didn't realize. My bad...
Yincognito wrote: September 15th, 2023, 6:20 pm Thanks for providing it, it makes sense. I was thinking at breaking the condition into multiple ones, but I believe your choice is way better.
I'm glad if you think so.
User avatar
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

balala wrote: September 15th, 2023, 8:03 pm Sorry, didn't realize. My bad...
No worries, it's not like this approach has been as successful as I wished it was - extensive guidance is still needed, and you're better suited to offer it at this time. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth