It is currently March 28th, 2024, 5:43 pm

Nesting variables in WebParser's URL option

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Nesting variables in WebParser's URL option

Post by Yincognito »

Just to be helpful a little...

Library/MeasureWebParser.cpp, line 336:
while ((start = url.find(L"[&", start)) != std::wstring::npos)

Basically, it doesn't check for [# in order to correctly identify the variable to pass to the parser.ReplaceVariables(var); line below. I'm not sure if the std::wstring var = L"["; is suited for variables either, although by the looks of it, it's perfect for measures or section variables.

There might be other things that need some tweaking there, but unfortunately, I'm not an expert in C++ to point them out... :(
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Nesting variables in WebParser's URL option

Post by Brian »

Yeah, for the Webparser plugin (now a measure), we had to tweak the URL option in order to get DynamicVariables=1 to work. We settled on the "[&" syntax to reference another measure's value since the URL option previously used the section variables syntax as reference to another parent webparser measure.

Not long after, we agreed to allow for nested syntax in which we would accept the "[&" as a section variable in order to nest variables....and when we finally got it done, we forgot to edit the Webparser code to get it working. This will be fixed for the first 4.4 beta.

-Brian

PS - Thanks for the links to the code, however, as Captain Ramius would put it: "Your conclusions were all wrong ..." :D
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Nesting variables in WebParser's URL option

Post by Yincognito »

Brian wrote: April 8th, 2019, 5:22 am...and when we finally got it done, we forgot to edit the Webparser code to get it working. This will be fixed for the first 4.4 beta.

-Brian

PS - Thanks for the links to the code, however, as Captain Ramius would put it: "Your conclusions were all wrong ..." :D
No problem - I was just trying to make it easier for you, with my limited C++ knowledge. :D Glad to know it will be fixed in a future beta though - hopefully it won't be a difficult task. :thumbup:
Post Reply