It is currently February 25th, 2024, 7:58 am

Help | Resizable Skin

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

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: December 31st, 2022, 10:10 pm Can this be applied to [rainmeter] so it actually affects all the meters? Or how does it work exactly? According to what I know so far (not much as you can tell lol) the !bangs are mostly applied to mouse actions , is that right?
Since the bang has no section variables (not even other kind of variables) it can be used anywhere, including the [Rainmeter] section. For instance if you add an OnRefreshAction=[!SetWindowPosition "50%" "50%" "50%" "50%"] option to the [Rainmeter] section, you get the skin always centered on every refresh and activation. But you can place the bang in any mouse action (for instance to any MouseUpAction option of any meter, or even of the [Rainmeter] section, in which case the skin is centered when you click the meter you've placed the option in or when you click the skin, if you've placed the option to the [Rainmeter] section).
But no, bangs can be used not only in mouse action options. They can be placed in any option which is executed. For instance into IfTrueAction or IfFalseAction options (in this case they are executed when the set condition becomes true or false), or into OnChangeAction or OnUpdateAction options, if you want to get them executed when the value of the measure is changing or when the measure or meter is updated.
Possibilities are infinite...
RicardoTM wrote: December 31st, 2022, 10:10 pm I edited my last post but you may have missed it, I changed the update to 20ms and put an UpdateDivider=50 in every measure, this way, I conserve the fast input while keeping the mesures updating at 1000ms. According to what I understood, that's how UpdateDivider works, right?
Yep, right, however just to save some extra and not needed typing, instead of adding the UpdateDivider option to all measures (and even if you didn't mention, to all meters as well, because they are also updated), you can add a DefaultUpdateDivider=50 option to the [Rainmeter] section of your code. This way you avoid the need of adding this option one by one, once added to the [Rainmeter] section, it is applied to all measures and meters. If there is any measure or meter which you want to update faster (as fast as is set by the Update option), you have to add an UpdateDivider=1 option to that measure or meter (in your case to the [MeasurePosition] measure).
RicardoTM
Posts: 124
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

Alright, that's good to know! Thank you Balala for the help! I've been busy with the new year so I haven't had time to finish the skin, I just finished polishing the formula for the gauge to work exactly as I want it to work (I'm almost there, until I finish understanding conditionals). But it's turning out great thanks to both of you.

Happy New Year!

Edit.
balala wrote: December 31st, 2022, 10:51 pm This way you avoid the need of adding this option one by one, once added to the [Rainmeter] section, it is applied to all measures and meters. If there is any measure or meter which you want to update faster (as fast as is set by the Update option), you have to add an UpdateDivider=1 option to that measure or meter (in your case to the [MeasurePosition] measure).
By the way, I ended up using my method, I realized that using mine I only have to use updatedivider=50 in 2 measures, your way I'd have to use it in everything but those 2 measures because all my meters move together since it's resizable, and I want that to be instantaneous.
Last edited by RicardoTM on January 2nd, 2023, 9:47 am, edited 2 times in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5333
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help | Resizable Skin

Post by eclectic-tech »

Glad to help! :welcome: Happy New Year!
RicardoTM
Posts: 124
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

Well, here's a little update. The skin is working flawlessly and it's almost finished. It is (almost) totally resizable and customizable. I did some fixes and finally changed all the variable, measure and meter names.

I'm trying to follow what Balala did to make the list follow the gauge, but now If I resize the Gauge, the list resizes too by targeting the Scaler Variable but no luck yet. Balala used a measure option and that doesn't work with meters, so I tried the !SetVariable bang but I'm not sure if I'm expressing it correctly.

According to the manual: !SetVariable SomeVariable "New value!" "Config". So I tried !SetVariable Scaler "#Scaler#" "RTM Skin VERSION 2\GPU Full Sensor List". I put it right after the end of the mouse scroll up and down options that Tech's created. No effect. Then I tried adding also !WriteKeyValue Variables Scaler #Scaler# "RTM Skin VERSION 2\GPU Full Sensor List" but nothing either.

What am I doing wrong?
Is there anything else do you guys think I should try?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5333
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help | Resizable Skin

Post by eclectic-tech »

RicardoTM wrote: January 2nd, 2023, 2:56 pm Well, here's a little update. The skin is working flawlessly and it's almost finished. It is (almost) totally resizable and customizable. I did some fixes and finally changed all the variable, measure and meter names.

I'm trying to follow what Balala did to make the list follow the gauge, but now If I resize the Gauge, the list resizes too by targeting the Scaler Variable but no luck yet. Balala used a measure option and that doesn't work with meters, so I tried the !SetVariable bang but I'm not sure if I'm expressing it correctly.

According to the manual: !SetVariable SomeVariable "New value!" "Config". So I tried !SetVariable Scaler "#Scaler#" "RTM Skin VERSION 2\GPU Full Sensor List". I put it right after the end of the mouse scroll up and down options that Tech's created. No effect. Then I tried adding also !WriteKeyValue Variables Scaler #Scaler# "RTM Skin VERSION 2\GPU Full Sensor List" but nothing either.

What am I doing wrong?
Is there anything else do you guys think I should try?
Hmm, I would use the nested syntax; [#Scaler] in an additional bang, in the same actions, when the variable was changed in a previous !SetVariable bang. This will tell the action to evaluate the Scaler variable and use the latest value in the bang.

!SetVariable Scaler "[#Scaler]" "RTM Skin VERSION 2\GPU Full Sensor List"

Make sure you have added DynamicVariables=1 on sections that use that variable in the associated config.
If that doesn't work, we may need to see your updated package.

Side Note: I recommend NOT using 'spaces' in config names; it can cause very difficult to find errors in some actions when the 'space' is interpreted as the end of the value.
User avatar
balala
Rainmeter Sage
Posts: 16016
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: January 2nd, 2023, 2:56 pm What am I doing wrong?
I'm a little bit confused now, because at least in the package I have now I see the GPU Gauge skin is resizable by scrolling, however the GPU Full Sensor List skin I have, is not. Maybe I've fallen behind somewhere, but this is it.
So to can take a look I'd need a version of the package which contains the resizable version of the skin. Please post it or post a link where it can be downloaded.
Sorry for this...
RicardoTM
Posts: 124
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

Hey Guys,
eclectic-tech wrote: January 2nd, 2023, 3:36 pm Hmm, I would use the nested syntax; [#Scaler] in an additional bang, in the same actions, when the variable was changed in a previous !SetVariable bang. This will tell the action to evaluate the Scaler variable and use the latest value in the bang.

!SetVariable Scaler "[#Scaler]" "RTM Skin VERSION 2\GPU Full Sensor List"

Make sure you have added DynamicVariables=1 on sections that use that variable in the associated config.
If that doesn't work, we may need to see your updated package.
Yup, "[#Scaler]" worked perfectly, this is the whole thing:

Code: Select all

MouseScrollDownAction=[!SetVariable Scaler (Clamp(#Scaler#-#MouseIncrement#,#MinSize#,#MaxSize#))][!WriteKeyValue Variables Scaler (Clamp(#Scaler#-#MouseIncrement#,#MinSize#,#MaxSize#))] [!SetVariable Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"] [!WriteKeyValue Variables Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"]
MouseScrollUpAction=[!SetVariable Scaler (Clamp(#Scaler#+#MouseIncrement#,#MinSize#,#MaxSize#))][!WriteKeyValue Variables Scaler (Clamp(#Scaler#+#MouseIncrement#,#MinSize#,#MaxSize#))] [!SetVariable Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"] [!WriteKeyValue Variables Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"]
I added [!WriteKeyValue Variables Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"] hoping that it would permanently write the change in the FullSensorList.ini so if I close it and re open it again, it would keep the change in the Scaler, but noup, it restores to Scaler=1 as soon as I refresh it or reload it by double clicking the gauge. I tried "[#Scaler]", "[#Scaler#]", "[Scaler]" and "Scaler".

In any case, the log error is !WriteKeyValue: File not found: C:\Users\ricar\Documents\Rainmeter\Skins\RTMSkinV0.3\GPU-Gauge\RTMSkinV0.3\GPU-FullSensorList (RTMSkinV0.3\GPU-Gauge\GPU.ini)
So yeah, I don't know how to use it apparently, it should not duplicate the file path.

Deleting "RTMSkinV0.3\GPU-FullSensorList" at the end of both Mouse actions fixes the log error with no changes but without fixing the wrong behavior tho.

Just to be clear, if you open the gauge, double click it to open the list, now make them smaller (scroll mouse down on the gauge), now refresh the list. It will restore.
eclectic-tech wrote: January 2nd, 2023, 3:36 pm Side Note: I recommend NOT using 'spaces' in config names; it can cause very difficult to find errors in some actions when the 'space' is interpreted as the end of the value.
Noted and fixed :thumbup: .
balala wrote: January 2nd, 2023, 3:57 pm I'm a little bit confused now, because at least in the package I have now I see the GPU Gauge skin is resizable by scrolling, however the GPU Full Sensor List skin I have, is not. Maybe I've fallen behind somewhere, but this is it.
So to can take a look I'd need a version of the package which contains the resizable version of the skin. Please post it or post a link where it can be downloaded.
Sorry for this...
Sorry! here's the latest version with all the new changes for both to check it!
RTMSkin_0.3.rmskin
Thank you again guys.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16016
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: January 3rd, 2023, 2:01 am I added [!WriteKeyValue Variables Scaler "[#Scaler]" "RTMSkinV0.3\GPU-FullSensorList"] hoping that it would permanently write the change in the FullSensorList.ini so if I close it and re open it again, it would keep the change in the Scaler, but noup, it restores to Scaler=1 as soon as I refresh it or reload it by double clicking the gauge. I tried "[#Scaler]", "[#Scaler#]", "[Scaler]" and "Scaler".
Sorry, but you made a mistake there. You forgot to add the Config name (the last parameter, in this case "RTMSkinV0.3\GPU-FullSensorList"). It is missing in the last uploaded package. This is why the variable is not written.
RicardoTM wrote: January 3rd, 2023, 2:01 am In any case, the log error is !WriteKeyValue: File not found: C:\Users\ricar\Documents\Rainmeter\Skins\RTMSkinV0.3\GPU-Gauge\RTMSkinV0.3\GPU-FullSensorList (RTMSkinV0.3\GPU-Gauge\GPU.ini)
So yeah, I don't know how to use it apparently, it should not duplicate the file path.

Deleting "RTMSkinV0.3\GPU-FullSensorList" at the end of both Mouse actions fixes the log error with no changes but without fixing the wrong behavior tho.
Ok, after taking a look, I updated your package, to get rid of the error messages. Just note that there were many such messages, for instance when you scrolled the mouse wheel. I finally think have succeeded in remove all these messages.
Since I made a lot of changes, I repack the config and upload this package. Just a few thing to be taken into account:
  • First and most important: in order to can remove those messages, I had to add a plugin, the ConfigActive. This plugin (and the appropriate measure, in this case [MeasureFullSensorList]), checks if the RTMSkinV0.3\GPU-FullSensorList\FullSensorList.ini skin is activated or not and acts accordingly. NOTE THAT IF YOU INSTALL THE ATTACHED PACKAGE, THE INSTALLER INSTALLS THE PLUGIN AS WELL TO YOUR COMPUTER (assuming it is not installed).
  • I created a @Resources\Variables.inc file, which stores the Scaler variable. I had to do this, because this variable is used in common by both skins (RTMSkinV0.3\GPU-Gauge\GPU.ini and RTMSkinV0.3\GPU-FullSensorList\FullSensorList.ini). In such cases it is much better not to duplicate the variable, but store it once, into a file included in both skins (with @Include options). Did this.
  • Since the Scaler variable is stored in the above file, the !WriteKeyValue bangs had to be rewritten, because:
    • They have to write the variable into the new file.
    • There is no reason to write the variable twice since it is used in common, so replaced the two !WriteKeyValue bangs with one single.
  • Added two new variables into the [Variables] section of the RTMSkinV0.3\GPU-Gauge\GPU.ini file (Config and ConfigActive).
  • Some other changes.
Please install, try the attached package and let me know what you think about it. I set the version of the skin included into the uploaded package to 0.4. When realizing the final version, you obviously will have to set the proper version number.
You do not have the required permissions to view the files attached to this post.
RicardoTM
Posts: 124
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

Hey Balala :welcome: Thank you for your reply.
balala wrote: January 3rd, 2023, 5:07 pm Ok, after taking a look, I updated your package, to get rid of the error messages. Just note that there were many such messages, for instance when you scrolled the mouse wheel. I finally think have succeeded in remove all these messages.
Yeah, those were because the list was not active when scrolling.
balala wrote: January 3rd, 2023, 5:07 pm Since I made a lot of changes, I repack the config and upload this package. Just a few thing to be taken into account:
  • First and most important: in order to can remove those messages, I had to add a plugin, the ConfigActive. This plugin (and the appropriate measure, in this case [MeasureFullSensorList]), checks if the RTMSkinV0.3\GPU-FullSensorList\FullSensorList.ini skin is activated or not and acts accordingly. NOTE THAT IF YOU INSTALL THE ATTACHED PACKAGE, THE INSTALLER INSTALLS THE PLUGIN AS WELL TO YOUR COMPUTER (assuming it is not installed).
I already had it installed for some reason lol. The list wasn't activating when double clicking, this was because you named the folder RTMSkin instead of RTMSkinV0.3, but nothing to worry about, already fixed it by changing the path name to RTMSkin in the code.

However, it does act weird. Now it correctly saves the size of the full list, but not the position. Check the gift:
ezgif.com-gif-maker.gif
To make sure, I uninstalled the previous versions that I had and installed it again, but same result.

Note. This only happens if you move the gauge while the list is active, otherwise the behavior is correct.

I tried adding a [!refresh] action at the end of the [PositionFollower] measure:

Code: Select all

[PositionFollower]
Measure=Calc
Formula=(#CURRENTCONFIGX# + #CURRENTCONFIGY#)
OnChangeAction=[!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)""(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "#ListPosX#%" "#ListPosY#%" "RTMSkin\GPU-FullSensorList"] [!Refresh]
DynamicVariables=1
Disabled=1
It works but not as expected, check the gift:
ezgif.com-gif-maker (1).gif
It produces that weird flickering while moving it around, any suggestion?
One workaround I'm thinking of is to make it refresh only when you release the left mouse click when you stop dragging it. I'll do some testing.
Edit.
It didn't work, I deleted the [!Refresh] action.

Another problem: When you click the blue circle in the list to close the list, and then you try to open it again by double clicking the gauge, nothing happens, you gotta double click again to open the list. Here's what the log says:
Error: !SetWindowPosition: Skin "RTMSkin\GPU-FullSensorList" not found (RTMSkin\GPU-Gauge\GPU.ini).
and then
Warning: !DeactivateConfig: "RTMSkin\GPU-FullSensorList" not active.

Edit.
I managed to fix both wrong behaviors by deleting the line [!SetVariable ConfigActive "(1-#ConfigActive#)"]#Action# and replacing it with a simple [!ToggleConfig "RTMSkin\GPU-FullSensorList" "FullSensorListV2.ini"]

In the new package below, you'll find a V2 variant, that's the one that have this change to compare.
balala wrote: January 3rd, 2023, 5:07 pm [*]I created a @Resources\Variables.inc file, which stores the Scaler variable. I had to do this, because this variable is used in common by both skins (RTMSkinV0.3\GPU-Gauge\GPU.ini and RTMSkinV0.3\GPU-FullSensorList\FullSensorList.ini). In such cases it is much better not to duplicate the variable, but store it once, into a file included in both skins (with @Include options). Did this.
[*]Since the Scaler variable is stored in the above file, the !WriteKeyValue bangs had to be rewritten, because:
  • They have to write the variable into the new file.
  • There is no reason to write the variable twice since it is used in common, so replaced the two !WriteKeyValue bangs with one single.
[*]Added two new variables into the [Variables] section of the RTMSkinV0.3\GPU-Gauge\GPU.ini file (Config and ConfigActive).
[*]Some other changes.[/list]
Please install, try the attached package and let me know what you think about it. I set the version of the skin included into the uploaded package to 0.4. When realizing the final version, you obviously will have to set the proper version number.
Ok, this makes me wonder, will I be able to duplicate the gauge? I mean, my goal is that once this skin is finished, I'll duplicate it to make another gauge for the CPU, another for the MOBO, another for the RAM and so on, so... my main question is that if we share the scaler variable, they would all scale at the same time right? I mean, it's not a big of a problem I guess, I can make a different scaler variable for every gauge and list.

Edit.

Another question, I see variables that don't exist in the [variables] section nor in the variables config such as #Action# and #Myconfig# in the ConfigActive measure

Code: Select all

[MeasureConfigActive]
Measure=Calc
Formula=#ConfigActive#
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!ActivateConfig "RTMSkin\GPU-FullSensorList" "FullSensorList.ini"][!SetVariable [color=#BF0000]MyConfig[/color] "#ListConfig#"][!UpdateMeter "Gauge"][!SetVariable [color=#BF0000]Action[/color] """[!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)" "(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "#ListAnchorX#%" "#ListAnchorY#%" "RTMSkin\GPU-FullSensorList"]"""][!UpdateMeter "InvisibleCircle"]
IfFalseAction=[!DeactivateConfig "RTMSkin\GPU-FullSensorList"][!SetVariable [color=#BF0000]MyConfig[/color] ""][!UpdateMeter "Gauge"][!SetVariable [color=#BF0000]Action[/color] ""][!UpdateMeter "InvisibleCircle"]
DynamicVariables=1
In the Gauge meter

Code: Select all

MouseScrollDownAction=[!SetVariable Scaler (Clamp(#Scaler#-#MouseIncrement#,#MinSize#,#MaxSize#))][!WriteKeyValue Variables Scaler "(Clamp(#Scaler#-#MouseIncrement#,#MinSize#,#MaxSize#))" "#@#Variables.inc"][!SetVariable Scaler "[#Scaler]" "#[color=#BF0000]MyConfig[/color]#"]
MouseScrollUpAction=[!SetVariable Scaler (Clamp(#Scaler#+#MouseIncrement#,#MinSize#,#MaxSize#))][!WriteKeyValue Variables Scaler "(Clamp(#Scaler#+#MouseIncrement#,#MinSize#,#MaxSize#))" "#@#Variables.inc"][!SetVariable Scaler "[#Scaler]" "#[color=#BF0000]MyConfig[/color]#"]
and in the InvisibleCircle meter

Code: Select all

LeftMouseDoubleClickAction=[!SetOption FullList FontColor #Color3#][!SetOption ValueText FontColor #Color3#][!SetVariable ConfigActive "(1-#ConfigActive#)"][color=#BF0000]#Action#[/color]
My guess is that MyConfig is a variable to reference to the actual config path (RTMSkin\GPU-Gauge\) but what is the #Action# Variable? What does it do? I'm trying to find information about it but there's nothing I can find in the documentation.

Thank you very much balala!

P.S. I'll upload a newer version with this and some other changes I did as soon as it's finished.

Edit.
Here's the latest package with all new changes, including yours.
RTMSkin_0.4.rmskin
V0.4 Changes:
  • Added comments to almost everything.
  • Changed the name of some variables to make them more explicit.
  • Added 3 Measures to separate the State Measure formula.
  • Changed colors and added Mouse Actions when hovering the texts in both the gauge and the list.
  • Added a red colored variant for both the gauge and the list and changed a line in the Invisible Circle meter.
  • Added Balala code, plugin measure and variables file (this package doesn't include the plugin dll since I didn't find it in the plugins folder).
  • Some other changes.
You do not have the required permissions to view the files attached to this post.
Last edited by balala on January 4th, 2023, 9:38 pm, edited 1 time in total.
Reason: Please use <code> tags, not <Snippet>, whenever are posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16016
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: January 4th, 2023, 1:31 am P.S. I'll upload a newer version with this and some other changes I did as soon as it's finished.
In meantime I also made a few changes, attached you can find the result. Please check. I hope I succeeded in fixing most errors. Please let me know what you think.
I added a new version number, namely 0.5.
You do not have the required permissions to view the files attached to this post.