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

Win10 Widgets Network Customization

Get help with creating, editing & fixing problems with skins
Post Reply
tzr916
Posts: 10
Joined: March 31st, 2018, 4:27 pm

Win10 Widgets Network Customization

Post by tzr916 »

My 8" screen died, the replacement monitor can't do same resolutions, and windows scaling is not an option... So I enlarged the size of the widget but didn't care for the look of the graph line (10ft UI on 8" screen). I can get the graph line to appear as I like by changing UpdateDivider value from 10 to 6, but this results in the wrong string value! Why does UpdateDivider affect string value? Wouldn't it only affect the speed at which the graph is drawn/refreshed, not anything to do with the actual calculation of the string?

How can I keep the look of the graph line and get back to the correct string value?

Code: Select all

; ------------------------------------------------------------------------
; MEASURES
; ------------------------------------------------------------------------

[MeasureNetworkReceive]
; Returns receive activity on the current network in bytes.
Measure=NetIn
OnUpdateAction=[!UpdateMeter Graph4][!UpdateMeasure MeasureNetworkReceiveKb][!UpdateMeasure MeasureNetworkReceiveMb][!UpdateMeasure MeasureNetworkReceiveGb]
UpdateDivider=6

[MeasureNetworkReceiveKb]
; Returns receive activity on the current network in Kilobits.
Measure=Calc
Formula=((MeasureNetworkReceive*8)/#KBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
UpdateDivider=-1

[MeasureNetworkReceiveMb]
; Returns receive activity on the current network in Megabits.
Measure=Calc
Formula=((MeasureNetworkReceive*8)/#MBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
UpdateDivider=-1

[MeasureNetworkReceiveGb]
; Returns receive activity on the current network in Megabits.
Measure=Calc
Formula=((MeasureNetworkReceive*8)/#GBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
UpdateDivider=-1

[MeasureNetworkSend]
; Returns send activity on the current network in bytes.
Measure=NetOut
OnUpdateAction=[!UpdateMeasure MeasureNetworkSendKb][!UpdateMeasure MeasureNetworkSendMb][!UpdateMeasure MeasureNetworkSendGb]
UpdateDivider=6

[MeasureNetworkSendKb]
; Returns send activity on the current network in Kilobits.
Measure=Calc
Formula=((MeasureNetworkSend*8)/#KBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
UpdateDivider=-1

[MeasureNetworkSendMb]
; Returns send activity on the current network in Megabits.
Measure=Calc
Formula=((MeasureNetworkSend*8)/#MBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
UpdateDivider=-1

[MeasureNetworkSendGb]
; Returns send activity on the current network in Gigabits.
; Changes unit of measure between Kb, Mb, and Gb depending on how much data is being sent and/or received.
Measure=Calc
Formula=((MeasureNetworkSend*8)/#GBconversionFactor#)
OnChangeAction=[!UpdateMeter Value4]
IfCondition=(MeasureNetworkSendMb >= 1) || (MeasureNetworkReceiveMb >= 1)
IfTrueAction=[!SetVariable NetUnits "Mbps"][!SetOption Value4 MeasureName MeasureNetworkReceiveMb][!SetOption Value4 MeasureName2 MeasureNetworkSendMb]
IfCondition2=(MeasureNetworkSendGb >= 1) || (MeasureNetworkReceiveGb >= 1)
IfTrueAction2=[!SetVariable NetUnits "Mbps"][!SetOption Value4 MeasureName MeasureNetworkReceiveMb][!SetOption Value4 MeasureName2 MeasureNetworkSendMb]
IfCondition3=(MeasureNetworkSendGb < 1) && (MeasureNetworkReceiveGb < 1) && (MeasureNetworkSendMb < 1) && (MeasureNetworkReceiveMb < 1)
IfTrueAction3=[!SetVariable NetUnits "Kbps"][!SetOption Value4 MeasureName MeasureNetworkReceiveKb][!SetOption Value4 MeasureName2 MeasureNetworkSendKb]
UpdateDivider=-1
Top graph shows correct receive bits. Lower graph (with modified UpdateDivider) shows incorrect receive bits:
Attachments
w10network2.png
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Contact:

Re: Win10 Widgets Network Customization

Post by Active Colors »

Can you include the full code of your skin? You included only measures and that's not sufficient to make specific judgments.
tzr916
Posts: 10
Joined: March 31st, 2018, 4:27 pm

Re: Win10 Widgets Network Customization

Post by tzr916 »

Of course! See attached zip. UpdateDivider that I changed from 10 to 6 is located in networkTemplate.ini
Attachments
Win10 Widgets Custom.zip
(408.84 KiB) Downloaded 19 times
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Contact:

Re: Win10 Widgets Network Customization

Post by Active Colors »

tzr916 wrote: July 25th, 2022, 11:42 pm Why does UpdateDivider affect string value? Wouldn't it only affect the speed at which the graph is drawn/refreshed, not anything to do with the actual calculation of the string?

How can I keep the look of the graph line and get back to the correct string value?
I've checked the code. What you are describing happens because both the graph meter and the string meter share the same measure. Simple solution would be creating a copy of the measure(s) and then for every meter assigning own measure.

Poking around the skin files I don't really understand its structure. I might get back to it later if you don't find the solution.
Post Reply