It is currently September 19th, 2024, 8:24 pm

Help to assemble a formula

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

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 22nd, 2023, 9:22 pm PD:Although in this case it is only to increase its size, it cannot be made smaller than it is. From what I have tried, if I am wrong, tell me, and I set everything as you indicated and it only increases correctly. :thumbup:
It can be! You have to set a subunit value for the Size variable. With Size=0.5 for instance, the size of the globe is set to half of its normal size.

What is the next step? What else would you like to do?
User avatar
arcanosa84
Posts: 173
Joined: May 21st, 2023, 1:47 am

Re: Help to assemble a formula

Post by arcanosa84 »

balala wrote: September 23rd, 2023, 7:49 pm It can be! You have to set a subunit value for the Size variable. With Size=0.5 for instance, the size of the globe is set to half of its normal size.

What is the next step? What else would you like to do?
True, it didn't occur to me to try decimal numbers, I already tried and although I have to adjust the image of the atmosphere since it never coincides with the planet, but I'll check that now and see how to center it so that when magnified they are visible correctly. :thumbup: :thumbup: :thumbup:

There I left the moon and the sun activated, which are the easiest to activate from that same skin.
On page 2, when I select, for example, the sun, it is the center button in the sun group, it activates the panel to change the values. there everything is fine. If I select the moon, these values that are displayed still correspond to the sun, I cannot get them to update correctly. without leaving said page, for it to work I have to update all the skins with !RefreshApp and it is not how I want. law that the skin must be updated when values are written with !WriteKeyValue.
With this line I activate the configuration of the planets
LeftMouseDownAction = [!DisableMeasureGroup Planet][!WriteKeyValue Variables PlanetSelect Sol "#@#\Config\Variables.inc"][!UpdateMeasureGroup Planet][!EnableMeasureGroup Planet][!ShowMeterGroup Planet]
The part of the code that has to do with changing the configuration of the planets is at the end.
I thought about putting this part of the code in a separate document because of what I read in the manual about when you write a variable with !WriteKeyValue, to update it as a skin alone, but I'm not sure how to do that when moving the configuration skin the east as fixed to it.
This is what I'm working on, I had already published it to you but it doesn't matter, this code is more complete, since I have continued working on the things I was missing, although I haven't finished it yet.
Give me your criteria to see how I can solve this time.
and thank you very much for your support. :great: :great: :great: :thumbup: :thumbup:
You do not have the required permissions to view the files attached to this post.
:Whistle :Whistle Learning is the most complete art of life. Just enjoy it. :bow: :bow:
User avatar
balala
Rainmeter Sage
Posts: 16564
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 23rd, 2023, 9:10 pm On page 2, when I select, for example, the sun, it is the center button in the sun group, it activates the panel to change the values. there everything is fine.
Sorry, but can't follow what is going on. In the last posted skin, the planets icons are missing on the second page:
Settings.png
So how do I select any of the planets?
You do not have the required permissions to view the files attached to this post.
User avatar
arcanosa84
Posts: 173
Joined: May 21st, 2023, 1:47 am

Re: Help to assemble a formula

Post by arcanosa84 »

balala wrote: September 24th, 2023, 7:07 pm Sorry, but can't follow what is going on. In the last posted skin, the planets icons are missing on the second page:
Settings.png
So how do I select any of the planets?
On page 1 you can activate the sun and moon. but in the application activate any planet and it will be shown there, remember that that was where I applied what they helped me with. When none are active, their icons are not displayed. tell me if you make it. greetings
:Whistle :Whistle Learning is the most complete art of life. Just enjoy it. :bow: :bow:
User avatar
balala
Rainmeter Sage
Posts: 16564
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 24th, 2023, 7:20 pm On page 1 you can activate the sun and moon. but in the application activate any planet and it will be shown there, remember that that was where I applied what they helped me with. When none are active, their icons are not displayed. tell me if you make it. greetings
Alright. Even if the Sun and Moon are perfectly enough, how do I activate the planets as well? Just curious...
Will have to take a deeper look, to can help you. Will do this later, or tomorrow, if you don't mind. Sorry...
User avatar
arcanosa84
Posts: 173
Joined: May 21st, 2023, 1:47 am

Re: Help to assemble a formula

Post by arcanosa84 »

balala wrote: September 25th, 2023, 7:23 pm Alright. Even if the Sun and Moon are perfectly enough, how do I activate the planets as well? Just curious...
Will have to take a deeper look, to can help you. Will do this later, or tomorrow, if you don't mind. Sorry...
Of course I understand you. I think it is a complex issue to solve, and I would really like to be able to finish it to move on to another phase.
I haven't finished configuring everything on the first page yet, as I have ideas that I need to organize, if all the skins are going to be there to select them and then configure them on page 2. I am still working on page 2, adding buttons and utilities. That's why I only have 2 planets on page 1 and some graphics to test only. I want to implement a 3rd page with color values, and some variables that I want to set up to change easily. But I'm not going to do much until I finish where I'm going.
When I can solve the problem I told you about, I will continue to adapt the other things, while I work on what I need to complete page 1, so I give you time to help me.
Thanks for your response. :great: :great: :thumbup:
:Whistle :Whistle Learning is the most complete art of life. Just enjoy it. :bow: :bow:
User avatar
balala
Rainmeter Sage
Posts: 16564
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 23rd, 2023, 9:10 pm On page 2, when I select, for example, the sun, it is the center button in the sun group, it activates the panel to change the values. there everything is fine. If I select the moon, these values that are displayed still correspond to the sun, I cannot get them to update correctly.
In the field of the angle (for instance) the Angle variable is shown. This doesn't depend on the selected planet. So, whatever planet you click to be shown, the same appears in the appropriate field. This is why you get the same values, no matter which planed do you select.
User avatar
arcanosa84
Posts: 173
Joined: May 21st, 2023, 1:47 am

Re: Help to assemble a formula

Post by arcanosa84 »

balala wrote: September 26th, 2023, 6:42 pm In the field of the angle (for instance) the Angle variable is shown. This doesn't depend on the selected planet. So, whatever planet you click to be shown, the same appears in the appropriate field. This is why you get the same values, no matter which planed do you select.
My friend, I think that is not the case, at least from my point of view, I will explain how I have done it and tell me if there is any error.
in the variables, they are formed in the following way

Code: Select all

[Variables]
Planet=#PlanetSelect#
Size=[#Size[#Planet]]
Speed=[#Speed[#Planet]]
Angle=[#InclinationAngle[#Planet]]
The variables that make up the configuration of the planets all depend on the Planet variable, and this is the one that is written every time you click on an icon on page 2, and it should read the values corresponding to that planet, and in fact it works Well, when you open the configuration skin for the first time everything goes well, the problem begins when you select one planet and then another, which is where it does not change, even though the PlanetSelect variable is written in the Variables.inc file.
I thought to solve this by separating the part of the configuration code for a secondary skin, but I wouldn't know how it would look better, and I would also need to know how I can make the 2 skins, that is, the configuration one and this one with the buttons, stay together as one .
Tell me if you understood me, at least I know that the variables work well because at the beginning they are loaded correctly, when changing planets is where it is not updated, or the information on the buttons is redrawn.

The main problem I have, for this and another problem that I will present to you later when we finish with this solution, is that when writing a variable in the inc files that I have, they do not fall into the skin unless I right click refresh. and I know that the manual says it is necessary, but then how do I do it without manually updating it to read those changed values???
:Whistle :Whistle Learning is the most complete art of life. Just enjoy it. :bow: :bow:
User avatar
balala
Rainmeter Sage
Posts: 16564
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help to assemble a formula

Post by balala »

arcanosa84 wrote: September 27th, 2023, 12:21 am My friend, I think that is not the case, at least from my point of view, I will explain how I have done it and tell me if there is any error.
First in the LeftMouseDownAction options of the [SelectPlanetTierra], [SelectPlanetLuna] (and so on) meters, you have bangs only to write the appropriate values to the [Variables] section of the @Resources\Config\Variables.inc file. A skin never can use a just-written value of a variable unless you're refreshing the skin, or (and usually this is a much better approach) besides the !WriteKeyValue bang you add a !SetVariable bang as well. This way you do two things: you write the value to the appropriate file, to can reuse it in case of a refresh and you get the same value dynamically, for immediate use in the skin.
So, for instance, add the following, red-marked bangs to the LeftMouseDownAction option of the [SelectPlanetLuna] meter: LeftMouseDownAction = [!DisableMeasureGroup Planet][!WriteKeyValue Variables PlanetSelect Luna "#@#\Config\Variables.inc"][!SetVariable PlanetSelect "Luna"][!SetVariable Planet "[#PlanetSelect]"][!SetVariable Size "[#Size[#Planet]]"][!SetVariable Speed "[#Speed[#Planet]]"][!SetVariable Angle "[#InclinationAngle[#Planet]]"][!UpdateMeasureGroup Planet][!EnableMeasureGroup Planet][!ShowMeterGroup Planet].
Note that besides setting the new value for the PlanetSelect variable, I updated with additional !SetVariable bangs the values of the Planet, Size, Speed and Angle variables as well. We have to do this because otherwise you don't get updated the appropriate values of these variables.
Didn't check, but you have to check, to have a DynamicVariables=1 option in every measure and meter, in which you want to use the values of the set variables (Planet, Size, Speed and Angle).
With this addition you still won't see an update of the variables when you click another planet, but this is happening only because the values of the #SizeLuna# and #SizeSol#, #SpeedLuna# and #SpeedSol# (and so on) variables are coinciding, in the @Resources\Config\Variables.inc file. If you set different values for these variables, you'll get the values updated, by adding the above bangs. Obviously I described here what you have to add only to the LeftMouseDownAction option of the [SelectPlanetLuna] meter. You have to add similar bangs to all LeftMouseDownAction options of all similar meters ([SelectPlanetTierra], [SelectPlanetVenus], [SelectPlanetMercurio] and so on).

Additional notes (recommend to take this into account):
  • Make sure (absolutely sure) you've added the DynamicVariables=1 option to all meters and measure in which you are using the variables, as described above. On meters and measure on which this option is missing, you don't get updated the variable(s).
  • Recommend not to use the LeftMouseDownAction option, unless it has to be used (use it only when you have both, a LeftMouseDownAction and a LeftMouseUpAction options on a meter). Use instead LeftMouseUpAction. You find out why in the Note here.
  • The #@# variable contains the backslash, no need to manually add one more. For instance this character is not needed right after the #@# variable, in the ImageName option of the [SelectPlanetMercurio] meter. There the ImageName you've used is this: ImageName = #@#\Images\Mercurio\Mercurio\Mercurio0.png (obviously once again this is just an example, you have such characters in all places where you did use the #@# variable). This option should look this way: ImageName=#@#Images\Mercurio\Mercurio\Mercurio0.png. Finally this is not a mistake, because Rainmeter simply ignores the not-needed characters (you can add even more than one single), however, strictly speaking, it is not needed. You can find out why, in the PS of this post.
Please let me know if the above things helped.
User avatar
Yincognito
Rainmeter Sage
Posts: 8187
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help to assemble a formula

Post by Yincognito »

balala wrote: September 27th, 2023, 6:48 pm Note that besides setting the new value for the PlanetSelect variable, I updated with additional !SetVariable bangs the values of the Planet, Size, Speed and Angle variables as well. We have to do this because otherwise you don't get updated the appropriate values of these variables.
Actually, none of you would be required to do this if those variables besides PlanetSelect were declared using the escaped nested syntax in [Variables], like I was suggesting here. In that case, setting only PlanetSelect (in a shorter bang chain as well) would have been enough, since the other variables depending on it would have been automatically parsed to the proper corresponding values. :D

Anyway, now it's too late for such adjustments and they could have potentially led to more complex multiple escaping in rare cases. I'm just saying this for the record, please carry on with the discussion. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth