It is currently September 8th, 2024, 12:18 am

Can't pass measure value to web parser

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

Re: Can't pass measure value to web parser

Post by Kotofanchik »

If for measure via !SetOption I set Update divider -1 despite the fact that it already has updatedivider=5, what will the result be?
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can't pass measure value to web parser

Post by Yincognito »

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?
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.

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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16499
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can't pass measure value to web parser

Post by balala »

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:
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.
Kotofanchik
Posts: 149
Joined: March 15th, 2024, 7:30 pm

Re: Can't pass measure value to web parser

Post by Kotofanchik »

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.
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can't pass measure value to web parser

Post by Yincognito »

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.
As always, thanks for clarifying it - I hoped you'd do so:
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.
Me, I always do the latter just to be sure, even though, as you said, it's not needed in this particular case. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can't pass measure value to web parser

Post by Yincognito »

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.
Yes, you understand it correctly. It was mentioned in the answers though:
Yincognito wrote: July 5th, 2024, 12:09 pm and then will not update anymore
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16499
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can't pass measure value to web parser

Post by balala »

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. :thumbup:
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!
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can't pass measure value to web parser

Post by Yincognito »

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!
Indeed, you're absolutely right. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Kotofanchik
Posts: 149
Joined: March 15th, 2024, 7:30 pm

Re: Can't pass measure value to web parser

Post by Kotofanchik »

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!
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)?
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can't pass measure value to web parser

Post by Yincognito »

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)?
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:
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. ;-)

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:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth