It is currently March 28th, 2024, 8:15 pm

ConfigActive 2.2.1

Plugins and Addons popular with the Community
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

Post by balala »

sl23 wrote: September 11th, 2021, 7:47 pm I am however, confused as to whether I need to specify ConfigName as you and SilverAside seem to have different views on this?
To use the IfCondition, indeed don't have to specify the ConfigName, however to get the ConfigActive plugin measure to work, you have to have this option properly defined. So which of us is right, depends on what you want to use the measure to.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: ConfigActive 2.2.1

Post by sl23 »

It's literally for specifying the Fill Color of the Shape Meter if a config is active or not. Nothing more. So I probably don't need ConfigName do I?

Here's the full config so you can see what I am trying to achieve.

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1
MouseActionCursor=0

[Metadata]
Name=RoundSkinLauncher
Author=sl23
Information=Use this skin to launch or disable skins. You can also open a skin for editing.
Version=2021.9.11
License=CC BY 3.0

[Variables]
Color1=255,255,255,200
Color2=128,255,0
Color3=128,255,0,200
Color4=0,255,255
Color5=255,255,255,60
Color6=255,128,0
Color7=255,85,85,255
Color8=130,230,130,224
Color9=255,255,0

Skin1=[!ToggleConfig "Rounded\RoundClock" "RoundClock.ini"]
Skin2=[!ToggleConfig "Rounded\RoundCPU+RAM" "RoundCPU+RAM.ini"]
Skin3=[!ToggleConfig "Rounded\RoundDrive1" "RoundDrive1 - 2Drive.ini"]
Skin4=[!ToggleConfig "Rounded\RoundDrive2" "RoundDrive2 - 2Drive.ini"]
Skin5=[!ToggleConfig "Rounded\RoundLauncher" "RoundLauncher1.ini"]
Skin6=[!ToggleConfig "Rounded\RoundMedia" "RoundMediaSpec.ini"]
Skin7=[!ToggleConfig "Rounded\RoundNet" "RoundNet.ini"]
Skin8=[!ToggleConfig "Rounded\RoundPower+Bin" "RoundPower+Bin.ini"]
Skin9=[!ToggleConfig "Rounded\RoundVolume" "RoundVolume.ini"]
Skin10=
Skin11=
Skin12=
Skin13=
Skin14=
Skin15=

Skin1Edit=#SkinsPath#Rounded\RoundClock\RoundClock.ini
Skin2Edit=#SkinsPath#Rounded\RoundCPU+RAM\RoundCPU+RAM.ini
Skin3Edit=#SkinsPath#Rounded\RoundDrive1\RoundDrive1 - 2Drive.ini
Skin4Edit=#SkinsPath#Rounded\RoundDrive2\RoundDrive2 - 2Drive.ini
Skin5Edit=#SkinsPath#Rounded\RoundLauncher\RoundLauncher1.ini
Skin6Edit=#SkinsPath#Rounded\RoundMedia\RoundMediaSpec.ini
Skin7Edit=#SkinsPath#Rounded\RoundNet\RoundNet.ini
Skin8Edit=#SkinsPath#Rounded\RoundPower+Bin\RoundPower+Bin.ini
Skin9Edit=#SkinsPath#Rounded\RoundVolume\RoundVolume.ini
Skin10Edit=#SkinsPath#
Skin11Edit=#SkinsPath#
Skin12Edit=#SkinsPath#
Skin13Edit=#SkinsPath#
Skin14Edit=#SkinsPath#
Skin15Edit=#SkinsPath#

Skin1Name=Clock
Skin2Name=CPU + RAM
Skin3Name=Drive 1
Skin4Name=Drive 2
Skin5Name=Launcher
Skin6Name=Media Player
Skin7Name=Net
Skin8Name=Power + Bin
Skin9Name=Volume + Mic
Skin10Name=
Skin11Name=
Skin12Name=
Skin13Name=
Skin14Name=
Skin15Name=

========================================
; Background
========================================
[Bg]
Meter=Shape
Shape=Rectangle 0,0,457,30,15 | Fill Color 0,0,0,150 | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=Stroke Color #Color5#
DynamicVariables=1
X=2
Y=2

[mConfig]
Measure=Plugin
Plugin=ConfigActive
ConfigName=Rounded\RoundClock
IfCondition=([&mConfig:IsActive(Rounded\RoundClock)] = 1)
IfTrueAction=[!SetOption Skin1 FillAlpha "Fill Color #Color2#"]
IfFalseAction=[!SetOption Skin1 "Fill Color" #Color5#]
IfCondition2=([&mConfig:IsActive(Rounded\RoundCPU+RAM)] = 1)
IfTrueAction2=[!SetOption Skin1 FillAlpha "FillColor #Color2#"]
IfFalseAction2=[!SetOption Skin1 FillColor #Color5#]
IfCondition3=([&mConfig:IsActive(#ConfigCalendar#)] = 1)
IfTrueAction3=[!SetVariable IsCalendarLoaded 1]
IfFalseAction3=[!SetVariable IsCalendarLoaded 0]
IfCondition4=([&mConfig:IsActive(#ConfigChronometer#)] = 1)
IfTrueAction4=[!SetVariable IsChronometerLoaded 1][!SetVariable VariantChronometer "[&mConfig:ConfigVariantName(#ConfigChronometer#)]"]
IfFalseAction4=[!SetVariable IsChronometerLoaded 0]
IfCondition5=([&mConfig:IsActive(#ConfigDrivesMeter#)] = 1)
IfTrueAction5=[!SetVariable IsDrivesMeterLoaded 1]
IfFalseAction5=[!SetVariable IsDrivesMeterLoaded 0]
DynamicVariables=1

========================================
; Title
========================================
[TitleBg]
Meter=Shape
Shape=Rectangle 0,0,130,20,10 | Fill Color 0,0,0,1 | StrokeWidth 2 | StrokeColor #Color5#
X=7
Y=7

[Title]
Meter=String
MeterStyle=sAllText
StringAlign=Center
FontFace=Trebuchet MS
FontSize=11
FontColor=#Color6#
AntiAlias=1
ClipString=1
Text=Skin Loader
X=72
Y=9
W=120

========================================
; Choose Skin
========================================
[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #Color5#
StrokeAlpha=StrokeColor 128,255,0,0

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #Color9#"][!SetOption Title Text "[#[#CURRENTSECTION]Name]"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""][!SetOption Title Text "Skin Loader"] [!UpdateMeter *] [!Redraw] 

LeftMouseUpAction=[#[#CURRENTSECTION]] [!UpdateMeter *][!Redraw]
RightMouseUpAction="[#[#CURRENTSECTION]Edit]"

DynamicVariables=1
Group=Button | Skin
X=20r
Y=r

[Skin1]
Meter=Shape
MeterStyle=sButton
X=145
Y=12

[Skin2]
Meter=Shape
MeterStyle=sButton

[Skin3]
Meter=Shape
MeterStyle=sButton

[Skin4]
Meter=Shape
MeterStyle=sButton

[Skin5]
Meter=Shape
MeterStyle=sButton

[Skin6]
Meter=Shape
MeterStyle=sButton

[Skin7]
Meter=Shape
MeterStyle=sButton

[Skin8]
Meter=Shape
MeterStyle=sButton

[Skin9]
Meter=Shape
MeterStyle=sButton

[Skin10]
Meter=Shape
MeterStyle=sButton

[Skin11]
Meter=Shape
MeterStyle=sButton

[Skin12]
Meter=Shape
MeterStyle=sButton

[Skin13]
Meter=Shape
MeterStyle=sButton

[Skin14]
Meter=Shape
MeterStyle=sButton

[Skin15]
Meter=Shape
MeterStyle=sButton
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

Post by balala »

sl23 wrote: September 11th, 2021, 8:17 pm So I probably don't need ConfigName do I?
No, you don't need it.
sl23 wrote: September 11th, 2021, 8:17 pm Here's the full config so you can see what I am trying to achieve.
  • The !SetOption bang of the IfFalseAction option of the [mConfig] measure is incorrect. Practically there are less parameters then it should be: [!SetOption Skin1 FillAlpha "Fill Color #Color5#"]. Same for the IfFalseAction2 option.
  • Even if this is not an error, however I'd use some variables in the IsActive functions of the IfConditionX options.
  • You did use such variables into the IfCondition3 - IfCondition5 options, however those variables are not defined.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: ConfigActive 2.2.1

Post by sl23 »

I understand the IfConditions aren't correct but the first IfTrueAction is, isn't it? But it doesn't work. Its not changing the Fill Color at all.

Until I know that works, I can't move on to the rest of it and changing it to use variables for the config's.

The IfConditions 3 to 5 are just copy and pasted from SilverAzide's welcome code in his gadget suite so I knew how to format it. But I just can't seem to get it working for some reason. That's why there are no variables defined for them.

I'm trying to get the code working before using variables. There's little point changing all 5 Conditions if they don't work. One step at a time. :D
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

Post by balala »

sl23 wrote: September 11th, 2021, 10:00 pm I understand the IfConditions aren't correct but the first IfTrueAction is, isn't it? But it doesn't work. Its not changing the Fill Color at all.
But yes, it does work, but this kind of skins which has to check periodically if another skin is activated, have to not have the Update set to Update=-1 ([Rainmeter] section), as your skin, because if anytime later than the refresh / activation of this skin, the checked skin is activated or deactivated, this one won't follow this modified status until next refresh. So replace the Update=-1 with the default Update=1000. This fixes the mentioned issue.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: ConfigActive 2.2.1

Post by sl23 »

Ah, that fixed it! Thanks very much balala :thumbup:
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

Post by balala »

sl23 wrote: September 12th, 2021, 8:57 pm Ah, that fixed it! Thanks very much balala :thumbup:
Alright, I'm glad. However take care when are you using the Update=-1 option, because even if in some cases it can reduce resource usage, other times it can mess many things.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: ConfigActive 2.2.1

Post by sl23 »

Yeah I can see that now. Thank you for the tip :thumbup:
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

Post by balala »

sl23 wrote: September 13th, 2021, 12:04 pm Yeah I can see that now. Thank you for the tip :thumbup:
:thumbup:
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: ConfigActive 2.2.1

Post by CodeCode »

I am attempting to use the Type=Count with a measure like this:

Code: Select all

[ConfigActive]
Measure=Plugin
Plugin=ConfigActive
Type=Count
DynamicVariables=1
When assigning the measure with a text meter, nothing is being returned.

When I use a section variable [ConfigActive:] it returns the %1 literally.

Not sure what I am missing?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.