It is currently September 8th, 2024, 12:18 am
Can't pass measure value to web parser
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
If for measure via !SetOption I set Update divider -1 despite the fact that it already has updatedivider=5, what will the result be?
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
If you also update that measure and have DynamicVariables=1 on it, then the result should be the expected one: that measure will update once to reflect the change and then will not update anymore, unless of course you update it manually / on demand at a later time, using the same approach. It might be possible to do things with just setting the option and without updating and dynamic variables though.Kotofanchik wrote: ↑July 5th, 2024, 6:43 am If for measure via !SetOption I set Update divider -1 despite the fact that it already has updatedivider=5, what will the result be?
I suppose you know by now that using !UpdateMeasure on a WebParser will only update the values of its options, and will not request data again, like it would when using !CommandMeasure.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Can't pass measure value to web parser
In fact !SetOption doesn't require to set the DynamicVariables=1 on the measure or meter on which the bang sets a new option. !SetVariable does, the measure or meter on which you set a variable by a !SetVariable has to have set the DynamicVariables=1 option, but !SetOption doesn't. Here is a short explanation.Yincognito wrote: ↑July 5th, 2024, 12:09 pm If you also update that measure and have DynamicVariables=1 on it, then the result should be the expected one:
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
Do I understand correctly that !SetOption Update divider -1 (UpdateDivider=-1) will in any case disable the update of the measure specified in it completely? Otherwise I didn’t hear this in the answers.
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
As always, thanks for clarifying it - I hoped you'd do so:balala wrote: ↑July 5th, 2024, 6:06 pm In fact !SetOption doesn't require to set the DynamicVariables=1 on the measure or meter on which the bang sets a new option. !SetVariable does, the measure or meter on which you set a variable by a !SetVariable has to have set the DynamicVariables=1 option, but !SetOption doesn't. Here is a short explanation.
Me, I always do the latter just to be sure, even though, as you said, it's not needed in this particular case.Yincognito wrote: ↑July 5th, 2024, 12:09 pm It might be possible to do things with just setting the option and without updating and dynamic variables though.
![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
Yes, you understand it correctly. It was mentioned in the answers though:Kotofanchik wrote: ↑July 5th, 2024, 10:07 pm Do I understand correctly that !SetOption Update divider -1 (UpdateDivider=-1) will in any case disable the update of the measure specified in it completely? Otherwise I didn’t hear this in the answers.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Can't pass measure value to web parser
Yep, technically speaking setting an option with a !SetOption bang doesn1t require to set on the dynamic variables on the meter or measure where you set it. However if you set a variable with a !SetVariable bang, the measure or meter on which the variable has to be used has to have set on the dynamic variables.Yincognito wrote: ↑July 6th, 2024, 8:25 am As always, thanks for clarifying it - I hoped you'd do so:
Me, I always do the latter just to be sure, even though, as you said, it's not needed in this particular case.![]()
But to be honest, I strongly doubt you don't know this!
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
Indeed, you're absolutely right.balala wrote: ↑July 6th, 2024, 7:56 pm Yep, technically speaking setting an option with a !SetOption bang doesn1t require to set on the dynamic variables on the meter or measure where you set it. However if you set a variable with a !SetVariable bang, the measure or meter on which the variable has to be used has to have set on the dynamic variables.
But to be honest, I strongly doubt you don't know this!
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
-
- Posts: 149
- Joined: March 15th, 2024, 7:30 pm
Re: Can't pass measure value to web parser
Now explain it to me. Should counters or measures that depend on a counter set via !SetOption bang be dynamic variables? Is it enough if they also do !UpdateMeter (measure)?balala wrote: ↑July 6th, 2024, 7:56 pm Yep, technically speaking setting an option with a !SetOption bang doesn1t require to set on the dynamic variables on the meter or measure where you set it. However if you set a variable with a !SetVariable bang, the measure or meter on which the variable has to be used has to have set on the dynamic variables.
But to be honest, I strongly doubt you don't know this!
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Can't pass measure value to web parser
Until balala answers this (me, I'm not a fan of repeating things already written in the manual - after all, that's why it was written) here you have these principles explained in detail:Kotofanchik wrote: ↑July 6th, 2024, 11:30 pm Now explain it to me. Should counters or measures that depend on a counter set via !SetOption bang be dynamic variables? Is it enough if they also do !UpdateMeter (measure)?
https://docs.rainmeter.net/tips/setoption-guide/
https://docs.rainmeter.net/manual/variables/#DynamicVariables
https://docs.rainmeter.net/manual/measures/general-options/ifconditions/
https://docs.rainmeter.net/manual/measures/calc/
Or, even better, if you want a short summary about it:
https://docs.rainmeter.net/tips/dynamiccheatsheet/
Whether it's about counters or something else, the ideas are the same, they don't change. It just depends on where you do it and how you do it, like explained in the summary above.
![Wink ;-)](./images/smilies/innuendo.gif)
Personally, I often don't bother much with all the exceptions and just use DynamicVariables=1 wherever I'm dealing with a changing #variable# or [measure]. Just like you, I also thought about converting my skins into not using DynamicVariables=1 at all in the past, via bangs and !SetOptions, but it's quite an effort for a relatively small gain, it often increases the length of bangs, and in some more complex cases it's just not feasible or possible to do it.
![Confused :confused:](./images/smilies/bn.gif)