It is currently December 5th, 2021, 1:48 am

make the "LeftMouseUpAction=" rewrite the "255,255,255,255" of another skin

Help with creating, editing & fixing problems with skins
Rafamear
Posts: 36
Joined: November 15th, 2021, 1:47 am
Location: Brazil

make the "LeftMouseUpAction=" rewrite the "255,255,255,255" of another skin

Post by Rafamear »

SystemVisualizer.rar
Thank you so much, I think that's all I wanted to do in this skin it's already been done, it's finished, thanks everyone for your help!
8-)
You do not have the required permissions to view the files attached to this post.
Last edited by Rafamear on November 18th, 2021, 2:34 pm, edited 7 times in total.
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: help with my [PlaceHolder]

Post by CodeCode »

If that meter is used in every skin, then this is one way of changing colors using a variable.

Code: Select all

[Variables]
PlaceHolderFill=45,200,20,255
PlaceholderStroke=200,200,30,255

[PlaceHolder]
Meter=Shape
Shape=Rectangle 5,5,218,100,8 | Fill Color #PlaceholderFill# | StrokeWidth 5 | Stroke Color #PlaceholderStroke#

Code: Select all

[MeterClick]
Meter=Image
X=YourStaticXValueUpperLeftOfPreferedLocation
Y=YourStaticYValueUpperLeftOfPreferedLocation
W=40
H=40
SolidColor=0,80,255,1
DynamicVariables=1
LeftMouseUpAction=[!SetVariable PlaceHolderFill 200,45,20,255][!Update]
To Make The Color Persist After a Refresh:
LeftMouseUpAction=[!SetVariable PlaceHolderFill 200,45,20,255][!WriteKeyValue Variables PlaceHolderFill 200,45,20,255][!Update]

EDIT: I forgot to mention using double quotes should be practiced around the color values like so:
LeftMouseUpAction=[!SetVariable PlaceHolderFill "200,45,20,255"][!WriteKeyValue Variables PlaceHolderFill "200,45,20,255"][!Update]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Rafamear
Posts: 36
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Re: help with my [PlaceHolder]

Post by Rafamear »

Is there any way to do this through another skin? like, I have the File.ini where the PlaceHolder is and I want to change its color, so I open a menusettings.ini that when I click on a certain color it puts it in the File.ini without me having to do that in the skin itself
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: help with my [PlaceHolder]

Post by CodeCode »

Rafamear wrote: November 15th, 2021, 11:00 am Is there any way to do this through another skin? like, I have the File.ini where the PlaceHolder is and I want to change its color, so I open a menusettings.ini that when I click on a certain color it puts it in the File.ini without me having to do that in the skin itself
Yes. There is a "config" option for both of those lines of text.
Try this:
LeftMouseUpAction=[!SetVariable PlaceHolderFill "200,45,20,255", "#SKINSPATH#TheSkinFolderName\TheSubFolderContainingTheINIyouWishToModify"][!Update]

Do the same thing for the !WriteKeyValue part if you need to preserve the color change after reloading the skin or restarting the computer.

Post any code you are changing, if that does not work for you. Remember to use the code </> button in the edit options at the top of the current edit window. Select the relevant text then click the </> button.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Rafamear
Posts: 36
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Re: help with my [PlaceHolder]

Post by Rafamear »

Thank you very much! I couldn't do this without you, if you want I can send you the skin I'm making, just don't post it publicly because I used some templates from other skins, when I get the authorization, I'm sure I'll post it! (I also want some resizing tips if it's too small) :thumbup:
Last edited by Rafamear on November 15th, 2021, 5:40 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 13516
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with my [PlaceHolder]

Post by balala »

CodeCode wrote: November 15th, 2021, 3:28 am EDIT: I forgot to mention using double quotes should be practiced around the color values like so:
LeftMouseUpAction=[!SetVariable PlaceHolderFill "200,45,20,255"][!WriteKeyValue Variables PlaceHolderFill "200,45,20,255"][!Update]
Quoting the expressions you want to set is always a very good idea. I'm quoting even the numbers, just to get used of using those quotes. When the string you want to assign doesn't containe spaces, there is no problem even if you're ignoring the quotes, however if that expression has one or more spaces, the quotes become mandatory, otherwise only the part from the beginning to the first space will be assign and additionally an error message is returned in the log. This is done because the bang won't find a config with the same name as the part of string following the space.
For instance [!SetVariable PlaceHolderFill 200,45,20,255] does perfectly work. However the [!SetVariable PlaceHolderFill "200,45,20,255"] form of the bang is better in a way that if the quotes are added a habbit of using them is formed and you won't forget them later. For instance the [!SetVariable PlaceHolderFill 200, 45, 20, 255] bang (note the spaces between the components of color code) is rising a !SetVariable: Skin "45," not found (Proba\Rainmeter Dock.ini) error message int he log, because since there are spaces but no quotes, Rainmeter will want to assign the first element of what is placed after the name of the variable and will consider the second element as being a config name, in which the variable should be set. Not finding such a config (almost sure it doesn't find), the error message rise in log.
Details here: https://forum.rainmeter.net/viewtopic.php?f=5&t=15253&p=85604#p85604
Rafamear
Posts: 36
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Re: help with my [PlaceHolder]

Post by Rafamear »

CodeCode wrote: November 15th, 2021, 2:01 pm Yes. There is a "config" option for both of those lines of text.
Try this:
LeftMouseUpAction=[!SetVariable PlaceHolderFill "200,45,20,255", "#SKINSPATH#TheSkinFolderName\TheSubFolderContainingTheINIyouWishToModify"][!Update]

Do the same thing for the !WriteKeyValue part if you need to preserve the color change after reloading the skin or restarting the computer.

Post any code you are changing, if that does not work for you. Remember to use the code </> button in the edit options at the top of the current edit window. Select the relevant text then click the </> button.
It's not working, I put it in a new skin and I was testing it, nothing worked, I don't know if it was because I was typing wrong or I was specifying the wrong .ini path, how should I do it?
User avatar
balala
Rainmeter Sage
Posts: 13516
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with my [PlaceHolder]

Post by balala »

Rafamear wrote: November 15th, 2021, 6:18 pm I don't know if it was because I was typing wrong
I hope you didn't type. Copy / paste is magic.
Follow the log. It reveals many problems.
Rafamear
Posts: 36
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Re: help with my [PlaceHolder]

Post by Rafamear »

what I meant by "typing wrong" was I was putting things in the wrong place Xd
User avatar
balala
Rainmeter Sage
Posts: 13516
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with my [PlaceHolder]

Post by balala »

Rafamear wrote: November 15th, 2021, 6:31 pm what I meant by "typing wrong" was I was putting things in the wrong place Xd
Post the whole code of your skin, please.