It is currently March 28th, 2024, 10:50 pm

ConfigActive 2.2.1

Plugins and Addons popular with the Community
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: ConfigActive 2.2.1

Post by CodeCode »

CodeCode wrote: February 3rd, 2022, 2:51 pm 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?
Haha it's me time:

I got it with this:
[!SetOption MeterOfEternity Text """[ActiveConfig:]"""][!Update]
I changed the section name to avoid some conflicting names issues, just to be safe
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2.1

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[ConfigActive]
Measure=Plugin
Plugin=ConfigActive
Type=Count

[MeterCount]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=[ConfigActive:]
DynamicVariables=1
The issue is that no "string" value is set with Type=Count. Only the "number" value is set.


1.png
You do not have the required permissions to view the files attached to this post.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: ConfigActive 2.2.1

Post by CodeCode »

so using this form, is why it works now?
[!SetOption MeterOfEternity Text """[ActiveConfig:]"""][!Update]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2.1

Post by jsmorley »

CodeCode wrote: February 3rd, 2022, 4:32 pm so using this form, is why it works now?
[!SetOption MeterOfEternity Text """[ActiveConfig:]"""][!Update]
Sure, that will work, as it is specifically using the "number" return value, and not the "string" return value.
User avatar
Jeff
Posts: 326
Joined: September 3rd, 2018, 11:18 am

Re: ConfigActive 2.2.1

Post by Jeff »

I wanted to make a list of all the active skins using this plugin, I eventually got it, but I had 2 problems.
  1. On a skin with Update=1000, when you have Type=Count, the range is 0.0-1.0 on the first update, it fixes itself next update
  2. Type=Count and executing function Initialize() print(SKIN:GetMeasure('ConfigActive'):GetValue()) end returns 0, I imagine it's related to the problem above
I overcame both problems with a simple trick, dynamic new section variables

Code: Select all

[ScriptingAgain]
Measure=Script
ScriptFile=#@#GenerateFile.lua
NrOfLoadedSkins=[&ConfigActive:LoadedCount()]

Code: Select all

function Initialize()
	local Nr=SELF:GetOption("NrOfLoadedSkins")
	local file = io.open(SKIN:MakePathAbsolute(SELF:GetOption("IncFile")), "w")
	t={}
	for i = 1, nr do
		table.insert(t, "[Config"..i.."]")
		table.insert(t, "Type=Config")
		table.insert(t, "Index="..i)
		--blah blah same thing for Skin
	end
	file:write(table.concat(t, "\n"))
	file:close()
end
Works like a charm *chef's kiss noise*

Wish there was a sexier method of creating the sections, I have 6 table.insert and it feels ugly :(

Thank you very much for the plugin!