Yincognito wrote: ↑June 30th, 2021, 9:26 pm Well, ActiveColors wanted short stuff, I gave him what he wanted...
Other than that, who cares what they are used for? The next generation already cares only whether things look nice, even less whether they work, and almost no concern for the "essence", so, no problem for a civilization of consumers...
It is currently April 20th, 2024, 9:54 am
[BUG?] in Multiple usage of #CURRENTSECTION#
-
- Moderator
- Posts: 1251
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
I know - it was just, well, let's call it an "exercise in simplification". For sure too much, but it was meant to be only a showcase, and a fitting conclusion of what works (at least we have 3 choices, right?).Active Colors wrote: ↑June 30th, 2021, 9:56 pmMan, I wanted it shorten it but in some understandable way ahaha. It is not that I optimize and simplify code by the number of characters, but the number of repetitions.
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
LMAO... ActiveColors is OPYincognito wrote: ↑June 30th, 2021, 9:26 pm Well, ActiveColors wanted short stuff, I gave him what he wanted...
Other than that, who cares what they are used for? The next generation already cares only whether things look nice, even less whether they work, and almost no concern for the "essence", so, no problem for a civilization of consumers...
But the way you handled the regex is on another level, I have to give you that.
from the Realm of Death
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
Only trying to match both the V2 and V3 versions of the weather.com JSON with the same regex was a bit of a challenge, the rest was just structuring its parts into variables (the subject of this thread, by the way) so I don't have to paste miles long lines from measure to measure. These variables are realy useful in Rainmeter to shorten things up.death.crafter wrote: ↑July 1st, 2021, 4:48 amBut the way you handled the regex is on another level, I have to give you that.
-
- Developer
- Posts: 2679
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
Ok. I think I made some progress on this.
Here is a special build for everyone to try:
I still have some testing to do, but my early tests seem to work.
-Brian
Here is a special build for everyone to try:
I still have some testing to do, but my early tests seem to work.
-Brian
You do not have the required permissions to view the files attached to this post.
-
- Moderator
- Posts: 1251
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
The examples which demonstrated the issue with escaped [#*CURRENTSECTION*]in Variables here and here are working properly now.
Also, I haven't noticed that this fix caused other parts to break on my side.
Will be doing more tests overtime as well.
Thanks Brian for the hard work!
EDIT:
This problem is now gone too. Yincognito, could you confirm this?
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
Holy crap! You fixed it in no time.
Can you explain what was wrong and what did you do to fix it?
Thanks for the hard work
from the Realm of Death
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
Amazing, Brian!
Everything I tested thus far works - now we can use
Code: Select all
[Variables]
CURRENTSECTIONINDEX=[&Script:SectionIndex('[#*CURRENTSECTION*]','last','(<x>)')]
The only thing that "doesn't work" are the initial harmless errors at refresh time, when the result of the Lua function is 0:
Code: Select all
[Variables]
CURRENTSECTIONINDEX=[&Script:SectionIndex('[#*CURRENTSECTION*]','last','(<x>)')]
; Alternative using inline Lua: [&Script:SectionIndex('[#CURRENTSECTION]','last','(<x>)')]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
---Measures---
[Script]
Measure=Script
ScriptFile=#@#Scripts\Script.lua
UpdateDivider=-1
---Meters---
[Background]
Meter=Image
W=100
H=100
SolidColor=255,0,0,255
[ObjIcon1]
Meter=Image
X=1
; a random 32 x 32 PNG
ImageName=#@#Images\a.png
[ObjDistance1]
Meter=Image
; These below used in a (formula) will produce harmless initial errors at skin refresh time
X=([&ObjIcon[#CURRENTSECTIONINDEX]:XW])
; X=([&ObjIcon[&Script:SectionIndex('[#CURRENTSECTION]','last','(<x>)')]:XW])
; X=([&ObjIcon[&Script:SectionIndex('ObjDistance1','last','(<x>)')]:XW])
; These below not in a (formula) won't produce harmless initial errors at skin refresh time
; X=[&ObjIcon[#CURRENTSECTIONINDEX]:XW]
; X=[&ObjIcon[&Script:SectionIndex('[#CURRENTSECTION]','last','(<x>)')]:XW]
; X=[&ObjIcon[&Script:SectionIndex('ObjDistance1','last','(<x>)')]:XW]
W=5
H=5
SolidColor=255,255,0,255
UpdateDivider=-1
DynamicVariables=1
-
- Moderator
- Posts: 1251
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [BUG?] in Multiple usage of #CURRENTSECTION#
Yes, this works as well now - as I said, every f...ing thing works.Active Colors wrote: ↑July 1st, 2021, 2:51 pmEDIT:
This problem is now gone too. Yincognito, could you confirm this?
Hopefully it won't break something else entirely, so fingers crossed.
Same here. So yes, Brian, please do - it would be interesting to find out what exactly was the issue and the solution.death.crafter wrote: ↑July 1st, 2021, 3:02 pmCan you explain what was wrong and what did you do to fix it?
Thanks for the hard work