It is currently October 13th, 2024, 4:53 pm

Need some design ideas to my smart internet widget

Skins that don't neatly fit into other categories
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Need some design ideas to my smart internet widget

Post by andersonventura »

no conection to internet = all hidden
when conected shows down and up speeds and blink the arrows independently when have activity on network.

the .ini needs to be formated as UCS-2 little endian to show the arrow characters.

i need some analisis to my code and some design ideas, pls!!! thanks! (sorry my english)

this widget is very useful for all pc players with bad internet providers (as NET CLARO Brasil)!

Code: Select all

[Rainmeter]
Update=1
BackgroundMode=1
[Variables]
MaxDownload=125.00
MaxUpload=9.99
[Styles]
[StyleNET_01]
FontFace=Segoe UI Regular
FontColor=255,255,255,255
FontSize=9
StringAlign=Left
AntiAlias=1
W=10
H=15
[StyleNET_02]
FontFace=Segoe UI Regular
FontColor=255,255,255,255
FontSize=9
StringAlign=Left
AntiAlias=1
W=65
H=18
[StyleNET_03]
FontFace=Segoe UI Regular
FontColor=255,255,255,190
FontSize=7
StringAlign=Left
AntiAlias=1
W=5
H=15
[Measures]
[MeasurePOINT]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
SysInfoData=Best
DynamicVariables=1
IfAboveValue=0
IfAboveAction=[!SetOption MeterNET_DL_01_TXT Hidden 0][!SetOption MeterNET_UP_01_TXT Hidden 0][!SetOption MeterNET_DL_02_TXT Hidden 0][!SetOption MeterNET_UP_02_TXT Hidden 0][!SetOption MeterNET_DL_03_TXT Hidden 0][!SetOption MeterNET_UP_03_TXT Hidden 0][!UpdateMeter *][!Redraw]
IfBelowValue=0
IfBelowAction=[!SetOption MeterNET_UP_01_TXT Hidden 1][!SetOption MeterNET_DL_01_TXT Hidden 1][!SetOption MeterNET_UP_02_TXT Hidden 1][!SetOption MeterNET_DL_02_TXT Hidden 1][!SetOption MeterNET_UP_03_TXT Hidden 1][!SetOption MeterNET_DL_03_TXT Hidden 1][!UpdateMeter *][!Redraw]
[MeasureNET_DL]
Measure=Plugin
Plugin=UsageMonitor
Category=Network Adapter
Counter=Bytes Received/sec
DynamicVariables=1
IfAboveValue=0.001
IfAboveAction=[!SetOption MeterNET_DL_01_TXT FontColor 0,255,0,255][!UpdateMeter *][!Redraw]
IfBelowValue=0.001
IfBelowAction=[!SetOption MeterNET_DL_01_TXT FontColor 0,255,0,170][!UpdateMeter *][!Redraw]
[MeasureNET_UP]
Measure=Plugin
Plugin=UsageMonitor
Category=Network Adapter
Counter=Bytes Sent/sec
DynamicVariables=1
IfAboveValue=0.001
IfAboveAction=[!SetOption MeterNET_UP_01_TXT FontColor 255,0,0,255][!UpdateMeter *][!Redraw]
IfBelowValue=0.001
IfBelowAction=[!SetOption MeterNET_UP_01_TXT FontColor 255,0,0,170][!UpdateMeter *][!Redraw]
[MeasureNET_DL_CALC]
Measure=Calc
Formula=(MeasureNET_DL)/1250000
Index=1
DynamicVariables=1
[MeasureNET_UP_CALC]
Measure=Calc
Formula=(MeasureNET_UP)/1250000
Index=1
DynamicVariables=1
[Meters]
[MeterNET_DL_01_TXT]
Meter=String
MeterStyle=StyleNET_01
FontColor=0,255,0,255
X=0
Y=0
Text=β–Ό
Hidden=1
[MeterNET_DL_02_TXT]
MeasureName=MeasureNET_DL_CALC
Meter=String
MeterStyle=StyleNET_02
X=18r
Y=0
Text=[MeasureNET_DL_CALC:4]
DynamicVariables=1
Hidden=1
[MeterNET_DL_03_TXT]
Meter=String
MeterStyle=StyleNET_03
X=40r
Y=3
Text=KB/s
Hidden=1
[MeterNET_UP_01_TXT]
Meter=String
MeterStyle=StyleNET_01
FontColor=255,0,0,255
X=0
Y=18
Text=β–²
Hidden=1
[MeterNET_UP_02_TXT]
MeasureName=MeasureNET_UP_CALC
Meter=String
MeterStyle=StyleNET_02
X=18r
Y=18
Text=[MeasureNET_UP_CALC:4]
DynamicVariables=1
Hidden=1
[MeterNET_UP_03_TXT]
Meter=String
MeterStyle=StyleNET_03
X=40r
Y=21
Text=KB/s
Hidden=1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need some design ideas to my smart internet widget

Post by eclectic-tech »

Changed skin update rate in the [Rainmeter] section from '1' to '200'; the lowest possible rate is '16'.
Added DefaultUpdateDivider=5 to the [Rainmeter] section to make the skin default update rate '1000' (200 * 5).

Modified sections [Meters] and [Measures] as comments ;Meters and ;Measures.

Added [MeasureBlink] which toggles between the value of '0' and '1'.
Modified your IfAboveAction of both up/down measures to set the FontColor transparency value to (170+(85*[MeasureBlink:])).
This will cause the arrows to blink when there is activity.
Added UpdateDivider=1 to measures and meters related to the 'blink' effect.

Added DynamicVariables=1 to [MeterNET_DL_01_TXT] and [MeterNET_UP_01_TXT] sections to respomd to 'blink' changes.

Removed (commented out) the invalid line Index=1 in [MeasureNET_DL_CALC] and [MeasureNET_UP_CALC] measures.

Spaced sections for easier readability.
netblink.gif

Code: Select all

[Rainmeter]
Update=200
DefaultUpdateDivider=5
BackgroundMode=1

[Variables]
MaxDownload=125.00
MaxUpload=9.99

[Styles]

[StyleNET_01]
FontFace=Segoe UI Regular
FontColor=255,255,255,255
FontSize=9
StringAlign=Left
AntiAlias=1
W=10
H=15

[StyleNET_02]
FontFace=Segoe UI Regular
FontColor=255,255,255,255
FontSize=9
StringAlign=Left
AntiAlias=1
W=65
H=18

[StyleNET_03]
FontFace=Segoe UI Regular
FontColor=255,255,255,190
FontSize=7
StringAlign=Left
AntiAlias=1
W=5
H=15

;Measures

[MeasureBlink]
Measure=Calc
Formula=(MeasureBlink+1)%2
DynamicVariables=1
UpdateDivider=1

[MeasurePOINT]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
SysInfoData=Best
DynamicVariables=1
IfAboveValue=0
IfAboveAction=[!SetOption MeterNET_DL_01_TXT Hidden 0][!SetOption MeterNET_UP_01_TXT Hidden 0][!SetOption MeterNET_DL_02_TXT Hidden 0][!SetOption MeterNET_UP_02_TXT Hidden 0][!SetOption MeterNET_DL_03_TXT Hidden 0][!SetOption MeterNET_UP_03_TXT Hidden 0][!UpdateMeter *][!Redraw]
IfBelowValue=0
IfBelowAction=[!SetOption MeterNET_UP_01_TXT Hidden 1][!SetOption MeterNET_DL_01_TXT Hidden 1][!SetOption MeterNET_UP_02_TXT Hidden 1][!SetOption MeterNET_DL_02_TXT Hidden 1][!SetOption MeterNET_UP_03_TXT Hidden 1][!SetOption MeterNET_DL_03_TXT Hidden 1][!UpdateMeter *][!Redraw]

[MeasureNET_DL]
Measure=Plugin
Plugin=UsageMonitor
Category=Network Adapter
Counter=Bytes Received/sec
DynamicVariables=1
IfAboveValue=0.001
IfAboveAction=[!SetOption MeterNET_DL_01_TXT FontColor 0,255,0,(170+(85*[*MeasureBlink:*]))][!UpdateMeter *][!Redraw]
IfBelowValue=0.001
IfBelowAction=[!SetOption MeterNET_DL_01_TXT FontColor 0,255,0,170][!UpdateMeter *][!Redraw]
UpdateDivider=1

[MeasureNET_UP]
Measure=Plugin
Plugin=UsageMonitor
Category=Network Adapter
Counter=Bytes Sent/sec
DynamicVariables=1
IfAboveValue=0.001
IfAboveAction=[!SetOption MeterNET_UP_01_TXT FontColor 255,0,0,(170+(85*[*MeasureBlink:*]))][!UpdateMeter *][!Redraw]
IfBelowValue=0.001
IfBelowAction=[!SetOption MeterNET_UP_01_TXT FontColor 255,0,0,170][!UpdateMeter *][!Redraw]
UpdateDivider=1

[MeasureNET_DL_CALC]
Measure=Calc
Formula=(MeasureNET_DL)/1250000
;Index=1
DynamicVariables=1
UpdateDivider=1

[MeasureNET_UP_CALC]
Measure=Calc
Formula=(MeasureNET_UP)/1250000
;Index=1
DynamicVariables=1
UpdateDivider=1

;Meters

[MeterNET_DL_01_TXT]
Meter=String
MeterStyle=StyleNET_01
FontColor=0,255,0,255
X=0
Y=0
Text=β–Ό
Hidden=1
DynamicVariables=1
UpdateDivider=1

[MeterNET_DL_02_TXT]
MeasureName=MeasureNET_DL_CALC
Meter=String
MeterStyle=StyleNET_02
X=18r
Y=0
Text=[MeasureNET_DL_CALC:4]
DynamicVariables=1
Hidden=1
UpdateDivider=1

[MeterNET_DL_03_TXT]
Meter=String
MeterStyle=StyleNET_03
X=40r
Y=3
Text=KB/s
Hidden=1
UpdateDivider=1

[MeterNET_UP_01_TXT]
Meter=String
MeterStyle=StyleNET_01
FontColor=255,0,0,255
X=0
Y=18
Text=β–²
Hidden=1
DynamicVariables=1
UpdateDivider=1

[MeterNET_UP_02_TXT]
MeasureName=MeasureNET_UP_CALC
Meter=String
MeterStyle=StyleNET_02
X=18r
Y=18
Text=[MeasureNET_UP_CALC:4]
DynamicVariables=1
Hidden=1
UpdateDivider=1

[MeterNET_UP_03_TXT]
Meter=String
MeterStyle=StyleNET_03
X=40r
Y=21
Text=KB/s
Hidden=1
UpdateDivider=1
You do not have the required permissions to view the files attached to this post.
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Re: Need some design ideas to my smart internet widget

Post by andersonventura »

Wow!!
I will try soon as possible!!!!!!
Thanks!!
πŸ‘πŸ»πŸ‘πŸ»πŸ‘πŸ»πŸ‘πŸ»
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need some design ideas to my smart internet widget

Post by eclectic-tech »

You are welcome.

To change the blink rate you can change [Rainmeter] Update= to a new value (lower for faster, higher for slower).
If you change that, I would recommend also changing the DefaultUpdateDivider= to a value, when multiplied by your new skin update value, equals close to 1000.
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Re: Need some design ideas to my smart internet widget

Post by andersonventura »

Perfect! I tested it here and it was very good! I organized the code better too.
Thanks a lot for the help! I just had a doubt,

in the formula, what is the purpose of "%2"?

Code: Select all

[MeasureBLINK]
DynamicVariables=1
UpdateDivider=1
Measure=Calc
Formula=(MeasureBLINK+1)%2
Last edited by balala on September 13th, 2020, 6:52 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
Alex88
Posts: 92
Joined: July 18th, 2020, 1:23 am
Location: California

Re: Need some design ideas to my smart internet widget

Post by Alex88 »

andersonventura wrote: ↑September 13th, 2020, 4:04 am ...
in the formula, what is the purpose of "%2"?
...
The %2 calculates the remainder/modulus of [MeasureBLINK] with respect to 2, and is what causes it to flip back and forth between 0 and 1:
The overall formula will add 1 to the current value, divide by 2, keep only the remainder, then will use that value on the next update of [MeasureBLINK].
If you open Manage Rainmeter, click Open log, Skins, then your current config, you'll see [MeasureBLINK] cycling between 0 and 1.
https://docs.rainmeter.net/tips/counters-guide/