It is currently April 27th, 2024, 4:19 pm

WebParser: Local Files and inserting the parsing result into the URL.

Get help with creating, editing & fixing problems with skins
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

I'm starting to think that my browser is not showing correctly what you are writing to me. :) This is an Anunnaki conspiracy, no other way.
I still don't understand why you call Regexpsubstitute - @include. But at least now I understand what you were trying to tell me. For the help in the analysis, thank you.
I would talk about regexpsubstitute only. I don't understand at all how this is related to @include.
Apparently there is some inconsistency in terminology.
Last edited by Kotofanchik on March 28th, 2024, 4:28 am, edited 2 times in total.
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

In my opinion, using webparser looks much easier in this case. The only thing that spoils it is the need to understand the work of codepage
But for later, apparently yes, using @include and rgexpsubstitute is easier
UP
I was already startled when I wrote in such a combination (@include and rgexpsubstitute) :D
Last edited by Kotofanchik on March 28th, 2024, 4:45 am, edited 2 times in total.
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

I admire your patience in trying to teach me. But if you were talking about regexpsubstitute and didn't mention @include in any way, then I would immediately understand what you were talking about. And my brain would be better preserved for reptilians :)
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

Special thanks for the empty regexp captures. That would be my next question. You're reading my mind..
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

I compared the work of webparser and regexpsubstitute. They work the same way, with the same result and the same bug. It is enough to insert the corresponding measure into my file and the operation of some subsequent measure c regexp is disrupted. It breaks the same way, I thought yesterday it was the result of inserting all these dynamic variables, but no. a measure appears with any of the parsing options and hello, part of the measure loses its ability to work. I found that those measures that parse the same source url lose their functionality. After processing in webparser and in regexpsubstitute, the url is no longer processed by other measures, but in the log it is clear that the URL variables are in their original form.
I created url 10 where I manually entered the same value as in the URL and processed it in substituteregexp url10, but again all measere using the original URL stopped working. Why is that?
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

Understood. impossible

Code: Select all

[Cod]
Measure=String
String=#UrlNow#
RegExpSubstitute=1
Substitute="(?sU)^.*-.*-(.*)/.*$":"\1","^\\\d+$":""
is located in the analyzed file itself, which is connected to Measures.inc via @Include=Settings.inc I moved it to Measures.inc and it started working fine
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

And in general, I finally understood why you started referring me to @substitute. This is so that regexpsubstitute can work correctly? but if it had sounded like using regexpsubstitute in sequence, first transferring the analyzed file to a separate file, and then connecting this separate file via @substitute, it would have come to me faster. :D

Maybe another problem was that this was exactly how it was for me initially. And the Settings.inc file with the URL was separated from the Measures.inc file and then connected to it via @substitute and even the option with webparser worked, but the result of its work, until they told me about the dynamic variable, did not want to be assigned.
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Kotofanchik »

Now everything is working exactly as I needed it to. Now I understand that everyone immediately offered to do exactly that, but it did not reach me what to do why and why.
Thanks again everyone for your patience.
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: WebParser: Local Files and inserting the parsing result into the URL.

Post by Yincognito »

Kotofanchik wrote: March 28th, 2024, 8:41 am Now everything is working exactly as I needed it to. Now I understand that everyone immediately offered to do exactly that, but it did not reach me what to do why and why. And I think it's not even that the translation was used. there's just a lot I don't understand, especially with variables and their behavior. I have practically no programming training. in 1990, I studied the Intel 8080A assembler for six months and that's it. :D
еще раз спасибо всем за терпение.
Yeah, no worries, it helps to have alternatives: when one isn't suited, the other might be. The choice is up to the user, as always. Take your time to understand things, there's no rush, we've all been novice at something at some point, so we know that it takes a while to get the idea. ;-)

Indeed, the RegExpSubstitute was added there so that I could use regular expressions (aka regex) in the Substitute option. By default, Substitute works without regular expressions, so using them needs to be "enabled" by the RegExpSubstitute=1 line.

So, it's a step by step process: the @include reads the other file therefore also getting the variable, the variable is passed to the String measure in the String option, the RegExpSubstitute enables regex for the Substitute in the measure, the Substitute then performs the string manipulation on the value of the measure (which was set to the value of the variable earlier).

It's more or less the same thing that the WebParser measure along with its RegExp and StringIndex options do, except that the WebParser method is more versatile and flexible for your particular case here, as you noticed.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth