Right, a copy - paste mistake. My mistake. Sorry. Fixed. Thanks for letting me know.Yincognito wrote: ↑June 29th, 2024, 1:33 pm You have a malformed [url=...] link there - probably autocorrect or something.
It is currently September 8th, 2024, 12:10 am
Can't pass measure value to web parser
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Can't pass measure value to web parser
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Can't pass measure value to web parser
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
Kotofanchik wrote: ↑June 29th, 2024, 3:23 pm I think about my mistakes
Yes, I did as written, the right time was found
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
P.S. For the record, the session ID cookie value (i.e. sid=...) shouldn't normally be part of a forum link as it's kind of private. Brian was talking about that some time ago, but the team fixed the said inclusion in the meantime.
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
Yes, firstly, instead of the word Timestamp, I wrote its meaning as I understood it. Secondly, square brackets. Well, the update of the measure in which I was looking for time after the main web parser finished working.
![Big Grin :D](./images/smilies/ag.gif)
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
How can I insert the found measure name into regexp? The name itself is calculated by another measure
She gets H5 And this is what H5 is equal to, which needs to be inserted into
RegExp ="(?siU)forecast valid="[H5]" tod(.*)$"
It works manually, but how can I force the skin to pass the value needed to Measure?
Code: Select all
[MTimeCN]
Measure=String
String=H[McalcTimeCN]
DynamicVariables=1
RegExp ="(?siU)forecast valid="[H5]" tod(.*)$"
It works manually, but how can I force the skin to pass the value needed to Measure?
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
Yes, just set it to 0 for that meter, e.g. [!SetOption SomeMeter DynamicVariables 0][!UpdateMeter SomeMeter].
This has nothing to do with regex, it will work everywhere - just use the nested syntax for variables / measures / meters:Kotofanchik wrote: ↑June 29th, 2024, 5:16 pmHow can I insert the found measure name into regexp? The name itself is calculated by another measure
https://docs.rainmeter.net/manual/variables/nesting-variables/
In your case, since both H5 and McalcTimeCN are measures, and measures need the & prefix in the nested syntax, you'd use [&H[&McalcTimeCN]]. This way, the value of McalcTimeCN will be used as part of the name of H5 (in other words, give the 5 in the H5 name).
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
Thank you, it works, or rather, this part works correctly, but in comparison, not everything turned out to be correct. And the comparison refused to work in exactly the same city as the previous version of the skin, where I otherwise tried to find the initial hour. But now I have a couple of working solutions to this problem and they work. That is, the skin now works. Yesterday I made an almost working version
And I wanted but was afraid to make square brackets twice, it looked very scary, but it also works. Moreover, I did it in the very city where comparison fails. That is, if I added brackets, I would not see the result
Without the help from this forum I would have given up.![Smiler :)](./images/smilies/ab.gif)
Ask, and it shall be given you..![Big Grin :D](./images/smilies/ag.gif)
Code: Select all
[MTimeCN]
Measure=String
String=H[&McalcTimeCN]
DynamicVariables=1
[mStartHour]
Measure =Plugin
Plugin =WebParser
Url =[mTotal]
RegExp ="(?siU)forecast valid="[[&MTimeCN]]" tod(.*)$"
StringIndex =1
StringIndex2=1
DynamicVariables=1
Without the help from this forum I would have given up.
![Smiler :)](./images/smilies/ab.gif)
Ask, and it shall be given you..
![Big Grin :D](./images/smilies/ag.gif)
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
The skin loads the processor a lot. I disable dynamic variables, but it doesn't help.
Question:
Is it possible to separate commands with an enter and not a space to make it easier to read?
And then the eyes are in a bunch.
Is it possible to not do DynamicVariables=1 from the very beginning and instead do FinishAction=[!UpdateMeasure namemeasure]?
Or even something like FinishAction=[!UpdateMeasure *][!UpdateMeter *]? And remove DynamicVariables=1 everywhere except the clock? Will that work? I saw an asterisk in the examples, but I didn’t understand how it could be done?
I disabled all dynamic variables in measure and also half of the skin in meter. I didn’t turn it off with a command, but removed it altogether and replaced it with !UpdateMeasure. Several people didn’t like it, so I left them, but added the command !SetOption name DynamicVariables 0 to them. There were 9 of these in the skin, eight of them had the updatedivider=5 parameter. And one hourly forecast parser. But the load remained. What else could be the problem?
Question:
Is it possible to separate commands with an enter and not a space to make it easier to read?
Code: Select all
FinishAction=[!UpdateMeasure McalcTimeCN][!SetOption mfullDateTime TimeStamp "[mfullDate]"][!UpdateMeasure mfullDateTime][!SetOption H0 TimeStamp "[mfullDate]"][!UpdateMeasure H0][!SetOption H1 TimeStamp "[mfullDate]"][!UpdateMeasure H1][!SetOption H2 TimeStamp "[mfullDate]"][!UpdateMeasure H2][!SetOption H3 TimeStamp "[mfullDate]"][!UpdateMeasure H3][!SetOption H4 TimeStamp "[mfullDate]"][!UpdateMeasure H4][!SetOption H5 TimeStamp "[mfullDate]"][!UpdateMeasure H5][!SetOption H6 TimeStamp "[mfullDate]"][!UpdateMeasure H6][!SetOption H7 TimeStamp "[mfullDate]"][!UpdateMeasure H7][!SetOption H8 TimeStamp "[mfullDate]"][!UpdateMeasure H8][!SetOption H9 TimeStamp "[mfullDate]"][!UpdateMeasure H9][!SetOption H10 TimeStamp "[mfullDate]"][!UpdateMeasure H10][!SetOption H11 TimeStamp "[mfullDate]"][!UpdateMeasure H11][!SetOption H12 TimeStamp "[mfullDate]"][!UpdateMeasure H12][!SetOption H13 TimeStamp "[mfullDate]"][!UpdateMeasure H13][!SetOption H14 TimeStamp "[mfullDate]"][!UpdateMeasure H14][!SetOption H15 TimeStamp "[mfullDate]"][!UpdateMeasure H15][!SetOption H16 TimeStamp "[mfullDate]"][!UpdateMeasure H16][!SetOption Temp DynamicVariables 0][!UpdateMeter Temp][!SetOption HiBar DynamicVariables 0][!UpdateMeter HiBar][!SetOption Hi DynamicVariables 0][!UpdateMeter Hi][!SetOption WaterBar DynamicVariables 0][!UpdateMeter WaterBar][!SetOption Water DynamicVariables 0][!UpdateMeter Water][!SetOption WindRotateVsBar DynamicVariables 0][!UpdateMeter WindRotateVsBar][!SetOption MeterRotateVs DynamicVariables 0][!UpdateMeter MeterRotateVs][!SetOption WindVal DynamicVariables 0][!UpdateMeter WindVal][!SetOption WindSpeedBar DynamicVariables 0][!UpdateMeter WindSpeedBar][!SetOption Meterwinspeed DynamicVariables 0][!UpdateMeter Meterwinspeed][!SetOption WindValspeed DynamicVariables 0][!UpdateMeter WindValspeed][!SetOption PressureBar DynamicVariables 0][!UpdateMeter PressureBar][!SetOption Pressure DynamicVariables 0][!UpdateMeter Pressure][!SetOption PressureVal DynamicVariables 0][!UpdateMeter PressureVal][!SetOption HumidityBar DynamicVariables 0][!UpdateMeter HumidityBar][!SetOption Humidity DynamicVariables 0][!UpdateMeter Humidity][!SetOption HumidityVal DynamicVariables 0][!UpdateMeter HumidityVal][!SetOption Validtimeimage DynamicVariables 0][!UpdateMeter Validtimeimage][!SetOption DateW_1 DynamicVariables 0][!UpdateMeter DateW_1][!SetOption DateW_2 DynamicVariables 0][!UpdateMeter DateW_2][!SetOption DateW_3 DynamicVariables 0][!UpdateMeter DateW_3][!SetOption DateW_4 DynamicVariables 0][!UpdateMeter DateW_4][!SetOption DateW_5 DynamicVariables 0][!UpdateMeter DateW_5][!SetOption DateW_6 DynamicVariables 0][!UpdateMeter DateW_6][!SetOption DateW_7 DynamicVariables 0][!UpdateMeter DateW_7]
Is it possible to not do DynamicVariables=1 from the very beginning and instead do FinishAction=[!UpdateMeasure namemeasure]?
Or even something like FinishAction=[!UpdateMeasure *][!UpdateMeter *]? And remove DynamicVariables=1 everywhere except the clock? Will that work? I saw an asterisk in the examples, but I didn’t understand how it could be done?
I disabled all dynamic variables in measure and also half of the skin in meter. I didn’t turn it off with a command, but removed it altogether and replaced it with !UpdateMeasure. Several people didn’t like it, so I left them, but added the command !SetOption name DynamicVariables 0 to them. There were 9 of these in the skin, eight of them had the updatedivider=5 parameter. And one hourly forecast parser. But the load remained. What else could be the problem?
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
We're glad you're satisfied with your progress, that's the idea. I like that you didn't give up, it's something I personally appreciate in people. You know my opinion that it could have been done simpler, but then doing it this way also helped you learn more things about working with the code in a skin than if you would have chosen the easier way, so it has benefits as well.Kotofanchik wrote: ↑June 30th, 2024, 2:02 am Without the help from this forum I would have given up.
Ask, and it shall be given you..![]()
![Great :great:](./images/smilies/dn.gif)
No. You probably didn't read this, since I was editing that post after posting it, but I already told you how to alternatively do it:Kotofanchik wrote: ↑June 30th, 2024, 4:46 am Is it possible to separate commands with an enter and not a space to make it easier to read?
Yincognito wrote: ↑June 29th, 2024, 3:00 pmMight worth adding all of them to a group and update that group instead, so you don't have to write a line as long as the Milky Way made up of update bangs of every individual measure.
Most of the times, yes, read here:Kotofanchik wrote: ↑June 30th, 2024, 4:46 am Is it possible to not do DynamicVariables=1 from the very beginning and instead do [...] [!UpdateMeasure namemeasure]? Or even something like FinishAction=[!UpdateMeasure *][!UpdateMeter *]? And remove DynamicVariables=1 everywhere except the clock? Will that work? I saw an asterisk in the examples, but I didn’t understand how it could be done?
https://docs.rainmeter.net/manual/variables/#DynamicVariables
The * asterisk means "all of the same type", so yeah, depending on the bang you use with it, it will apply it to all things of the same type, e.g. measures, meters, or even skins if you use a skin bang with the asterisk.
As for the CPU usage, it depends on many factors. WebParsers when retrieving data, audio measures, long strings and regexes, dynamic variables, the size and composition of the skin (e.g. large or scaled images, shapes, complicated math, etc.), as well as how frequently and at what time intervals you redraw such a skin, they all play a part in increasing the CPU usage, some having a smaller impact and some having a larger impact. Typically, redrawing a large and complex skin (especially when done frequently and at short intervals) is the biggest CPU hog, followed by scaling images and working with very large strings or many and complex shapes. Using dynamic variables takes much less, but if you have it everywhere in a more complex skin, its impact becomes more significant and adds to other performance issues already existing in such a skin. Here is where having an efficient code, with as few skin redraws, section updates, large or scaled images / shapes and dynamic variables as possible helps in alleviating such problems.