It is currently March 29th, 2024, 6:58 am

Skin to Change Value to another Skin

Get help with creating, editing & fixing problems with skins
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Skin to Change Value to another Skin

Post by Nilvarno »

Hello, i searched the forum to solve my problem, tried everything i found but didn't work, seemed easy enough but i really don't know what i'm doing wrong. Here's the thing: i want a skin to be used as a button to change a value on another, so that this other skin appears.
This:

Code: Select all

[Rainmeter]
Update=1000

[MeterButtonImage]
Meter=Image
ImageName="U.png"
X=2947
Y=2110
w=110
h=50
MouseOverAction=[!SetVariable Menu "1" "2ndBar\GameLauncher\GameLauncher.ini"]
Shall open this instead of HotKey:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Variables]
Menu=0
@Include=#@#Variables.inc

[MeasureToggle]
Measure=Plugin
Plugin=HotKey
HotKey=LALT NUM0
KeyDownAction=[!SetVariable Menu "(1-#Menu#)"][!UpdateMeasure "#CURRENTSECTION#"][!UpdateMeasure "MeasureMenu"]
DynamicVariables=1

[MeasureMenu]
Measure=Calc
Formula=#Menu#
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!ShowMeterGroup "Menu"][!HideMeterGroup "MSK3a"][!HideMeterGroup "MSK3b"][!HideMeterGroup "Lato-A"][!HideMeterGroup "Page1"][!HideMeterGroup "Page2"][!HideMeterGroup "Page3"][!Redraw]
IfFalseAction=[!HideMeterGroup "Menu"][!HideMeterGroup "MSK3a"][!HideMeterGroup "MSK3b"][!HideMeterGroup "Lato-A"][!HideMeterGroup "Page1"][!HideMeterGroup "Page2"][!HideMeterGroup "Page3"][!Redraw]
DynamicVariables=1
Thank you
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Skin to Change Value to another Skin

Post by Mor3bane »

I DID NOT TOTALLY DISSEMINATE YOUR CODE, BUT i HAVE NEEDED TO DO SIMILAR IN THE PAST.

Sorry caps.

Try:

Code: Select all

[!WriteKeyValue...] and [!UpdateMeter "config"]
My example:

Code: Select all

MouseOverAction=[!WriteKeyValue "ProcessText" "Text" "Windows Firewall" "#SKINSPATH#\Round Meters\Upper Left Tooltip\Upper Left Tooltip.ini"][!Refresh "Round Meters\Upper Left Tooltip"][!SetOption Top6 ImageName "#@#Clicky.png"][!UpdateMeter "Top6"][!Redraw]
MouseLeaveAction=[!WriteKeyValue "ProcessText" "Text" """" """" "#SKINSPATH#\Round Meters\Upper Left Tooltip\Upper Left Tooltip.ini"][!Refresh "Round Meters\Upper Left Tooltip"][!SetOption Top6 ImageName ""][!UpdateMeter "Top6"][!Redraw]
LeftMouseDownAction=["Shell:::{4026492F-2F69-46B8-B9BF-5654FC07E423}"]
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin to Change Value to another Skin

Post by balala »

Nilvarno wrote: December 14th, 2019, 10:34 pm Hello, i searched the forum to solve my problem, tried everything i found but didn't work, seemed easy enough but i really don't know what i'm doing wrong.
When you want to change dynamically such a variable into another skin, you have to use not the path of the according .ini file, but the config. This means that probably the MouseOverAction option of the [MeterButtonImage] meter should be: MouseOverAction=[!SetVariable Menu "1" "2ndBar\GameLauncher"].
Above red is the config of the GameLauncher.ini skin, this is what you have to use in almost all bangs (except probably just !WriteKeyValue, which indeed needs the complete path of the file where you want to write). If you want / have to set dynamically anything into another skin than the current one, you tell Rainmeter where to set that through the Config name, not through the skins .ini file. Because always only one .ini file can be loaded from a config, if you specify the name of the Config, Rainmeter always knows where to make that setting.
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Re: Skin to Change Value to another Skin

Post by Nilvarno »

I got it now, it works. thanks to both of you!. Anyway it's quite slow, i mean, i takes a couple of seconds for the other skin to appear, is there a way to speed up the process?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin to Change Value to another Skin

Post by balala »

Nilvarno wrote: December 15th, 2019, 10:47 am I got it now, it works. thanks to both of you!. Anyway it's quite slow, i mean, i takes a couple of seconds for the other skin to appear, is there a way to speed up the process?
Yep, probably same way as you did in the KeyDownAction option of the [MeasureToggle] measure you should update the [MeasureMenu] measure when you're hovering the mouse over the [MeterButtonImage] meter. For this you have to add a !UpdateMeasure bang to the previously posted MouseOverAction option: MouseOverAction=[!SetVariable Menu "1" "2ndBar\GameLauncher"][!UpdateMeasure "MeasureMenu" "2ndBar\GameLauncher"].
See that the above !UpdateMeasure bang, beside the MeasureMenu measure name, has one more parameter ("2ndBar\GameLauncher"), the name of the config in which the measure which has to be updated is located.
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Re: Skin to Change Value to another Skin

Post by Nilvarno »

woah, it's a rocket now! Thank you for solving and teaching me, you are the best. Oh. merry christmas too :bow:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin to Change Value to another Skin

Post by balala »

Nilvarno wrote: December 15th, 2019, 1:45 pm woah, it's a rocket now! Thank you for solving and teaching me, you are the best. Oh. merry christmas too :bow:
I'm glad. Merry Christmas to you too.