It is currently February 22nd, 2020, 6:50 am

Visions +

Help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 20258
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Visions +

Post by jsmorley »

eclectic-tech wrote:
December 31st, 2019, 1:09 pm
The date collecting from TWC is accurate for the reporting location. This condition may appear randomly near the end of the day (11 pm ~12 am) due to daylight savings versus standard time from location to location.

The skin does not try to correct the data supplied by TWC, so what you see is what they are sending.
It is fairly accurate in most cases and it is a free source (I guess you get what you paid for ;-) ).
That seems weird though. There is no effect of daylight savings time or proximity to midnight that would ever make January 1 be on a Tuesday in 2020. They need to get their act together... They are using the wrong year. January 1, 2019 was on Tuesday. So since "today" it is still 2019, they are just extrapolating forward based on that. Lazy.. ;-)

In any case, it is right for me...


1.png
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 9741
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visions +

Post by balala »

eclectic-tech wrote:
December 31st, 2019, 1:22 pm
But that would also lock all variations to the same data; that may be good for some user, while others may want variants to show other locations... It is going to be a "give and take" decision.

Thanks for the combined measures; they may make it into a future update. :thumbup:
For sure. It is a much better approach in my opinion. If the measures are shared in case you there is something changing only one set of measures has to be rewritten. If each skin use its own measures, you have to make the changes in every skin.
User avatar
jsmorley
Developer
Posts: 20258
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Visions +

Post by jsmorley »

Seems to me that this suite needs to centralize at least the location code and unit of measure into a .inc file, so it doesn't have to be set inside each and every skin...

But maybe this approach has some advantages. The code is very well commented, and isn't a bad way to see how to create a weather skin.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3761
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Visions +

Post by eclectic-tech »

jsmorley wrote:
December 31st, 2019, 1:27 pm
That seems weird though. There is no effect of daylight savings time or proximity to midnight that would ever make January 1 be on a Tuesday in 2020. They need to get their act together... They are using the wrong year. January 1, 2019 was on Tuesday. So since "today" it is still 2019, they are just extrapolating forward based on that. Lazy.. ;-)

In any case, it is right for me...
It was right for me too, and your explanation seems accurate :thumbup:
I was scratching my head for the reason, and my first thought was DST :uhuh: (I need more coffee!)

I'll just repeat... "You usually get what you pay for!" :sly:
User avatar
jsmorley
Developer
Posts: 20258
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Visions +

Post by jsmorley »

eclectic-tech wrote:
December 31st, 2019, 1:45 pm
It was right for me too, and your explanation seems accurate :thumbup:
I was scratching my head for the reason, and my first thought was DST :uhuh: (I need more coffee!)

I'll just repeat... "You usually get what you pay for!" :sly:
Fair enough, and words to live by. When it comes to computer programming though, my mantra is that any program that works 99.9% of the time is entirely broken and useless...

There is a great documentary on YouTube called Always/Never that explains how they met the goal with nuclear weapons that they must "ALWAYS go off when they are supposed to", and "NEVER go off when they are not".
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3761
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Visions +

Post by eclectic-tech »

Diablorojo wrote:
December 31st, 2019, 2:35 am
Ok, since yall have been such help i have another task for you,, I am using this disk monitor and i tried adding a 3rd disk to it using the instructions in the code, it seems to work but the third disk is showing my second disks capacity, and the second one is not showing the capacity any more. Will attach a screen shot of the meter in question shortly, Thanks again for all your help, been years since i played with this, Back to a learning curve... :D
You forgot the meter for disk3 value. Also, the Freedisk measure ignores removeable drives by default, so you need to tell those measures not to ignore them.

With those changes you get this code (Note: Usually I arrange meters in the order they appear in the skin, this is important when you use relative positioning, and it is easier to edit):

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

; HOWTO: Adding more disks
; ----------------------------------
; Adding more disks is a pretty straightforward process. Follow the following steps to turn
; this 2 disks skin into a 3 disks skin. You can then extend it even further as you wish.
;
; 1) Create a new variable called disk3=X: directly below disk2=D: in the [Variables] section
; 2) Create a copy of the [measureTotalDisk2] and [measureUsedDisk2] sections
; 3) Rename the copied sections to [measureTotalDisk3] and [measureUsedDisk3], respectively.
;    Also change Drive=#disk2# to Drive=#disk3#
; 4) Create a copy of the [meterLabelDisk2], [meterValueDisk2], and [meterBarDisk2].
;    Rename all Disk2's in the copied sections to Disk3.
; 5) Now we need to change the Y= values to adjust height. Change Y= under [meterLabelDisk3]
;    to Y=80 (calculated by adding 20 to the Y= value of previous meterLabel).
;    Then change Y= under [meterBarDisk3] to Y=92 (calculated by adding 20 to the Y= value of previous meterBar).
; 6) Save the file as '3 Disks.ini'. Now right-click on the Rainmeter tray icon and select
;    'Refresh All'. Now go activate the '3 Disks.ini' skin and enjoy! :)

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Disk
Author=poiru
Information=Displays disk usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=D:
disk3=F:
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureTotalDisk1]
; This measure returns the total disk space
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120

[measureUsedDisk1]
; Returns inverted value of free disk space (i.e. used disk space)
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Total=1
UpdateDivider=120
IgnoreRemovable=0

[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
InvertMeasure=1
UpdateDivider=120
IgnoreRemovable=0

[measureTotalDisk3]
Measure=FreeDiskSpace
Drive=#disk3#
Total=1
UpdateDivider=120
IgnoreRemovable=0

[measureUsedDisk3]
Measure=FreeDiskSpace
Drive=#disk3#
InvertMeasure=1
UpdateDivider=120
IgnoreRemovable=0

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Disks
; Even though the text is set to Disks, Rainmeter will display
; it as DISKS, because styleTitle contains StringCase=Upper.

[meterLabelDisk1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=#disk1#\

[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1B/%2B used
; %1 stands for the value of MeasureName (measureUsedDisk1 in this case).
; %2 stands for the value of MeasureName2.
NumOfDecimals=1
AutoScale=1
; Because disk measures return the free/used space in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.
LeftMouseUpAction=["#disk1#\"]
; Open #disk1# on click

[meterBarDisk1]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=10
Y=52
W=190
H=1

[meterLabelDisk2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=#disk2#\
LeftMouseUpAction=["#disk2#\"]

[meterValueDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1

[meterBarDisk2]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=10
Y=72
W=190
H=1

[meterLabelDisk3]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=#disk3#\
LeftMouseUpAction=["#disk3#\"]

[meterValueDisk3]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk3
MeasureName2=measureTotalDisk3
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1

[meterBarDisk3]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk3
X=10
Y=92
W=190
H=1
:great:
User avatar
Diablorojo
Posts: 16
Joined: December 29th, 2019, 1:40 am

Re: Visions +

Post by Diablorojo »

eclectic-tech wrote:
December 31st, 2019, 2:00 pm
You forgot the meter for disk3 value. Also, the Freedisk measure ignores removeable drives by default, so you need to tell those measures not to ignore them.

With those changes you get this code (Note: Usually I arrange meters in the order they appear in the skin, this is important when you use relative positioning, and it is easier to edit):

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

; HOWTO: Adding more disks
; ----------------------------------
; Adding more disks is a pretty straightforward process. Follow the following steps to turn
; this 2 disks skin into a 3 disks skin. You can then extend it even further as you wish.
;
; 1) Create a new variable called disk3=X: directly below disk2=D: in the [Variables] section
; 2) Create a copy of the [measureTotalDisk2] and [measureUsedDisk2] sections
; 3) Rename the copied sections to [measureTotalDisk3] and [measureUsedDisk3], respectively.
;    Also change Drive=#disk2# to Drive=#disk3#
; 4) Create a copy of the [meterLabelDisk2], [meterValueDisk2], and [meterBarDisk2].
;    Rename all Disk2's in the copied sections to Disk3.
; 5) Now we need to change the Y= values to adjust height. Change Y= under [meterLabelDisk3]
;    to Y=80 (calculated by adding 20 to the Y= value of previous meterLabel).
;    Then change Y= under [meterBarDisk3] to Y=92 (calculated by adding 20 to the Y= value of previous meterBar).
; 6) Save the file as '3 Disks.ini'. Now right-click on the Rainmeter tray icon and select
;    'Refresh All'. Now go activate the '3 Disks.ini' skin and enjoy! :)

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Disk
Author=poiru
Information=Displays disk usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=D:
disk3=F:
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureTotalDisk1]
; This measure returns the total disk space
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120

[measureUsedDisk1]
; Returns inverted value of free disk space (i.e. used disk space)
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Total=1
UpdateDivider=120
IgnoreRemovable=0

[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
InvertMeasure=1
UpdateDivider=120
IgnoreRemovable=0

[measureTotalDisk3]
Measure=FreeDiskSpace
Drive=#disk3#
Total=1
UpdateDivider=120
IgnoreRemovable=0

[measureUsedDisk3]
Measure=FreeDiskSpace
Drive=#disk3#
InvertMeasure=1
UpdateDivider=120
IgnoreRemovable=0

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Disks
; Even though the text is set to Disks, Rainmeter will display
; it as DISKS, because styleTitle contains StringCase=Upper.

[meterLabelDisk1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=#disk1#\

[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1B/%2B used
; %1 stands for the value of MeasureName (measureUsedDisk1 in this case).
; %2 stands for the value of MeasureName2.
NumOfDecimals=1
AutoScale=1
; Because disk measures return the free/used space in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.
LeftMouseUpAction=["#disk1#\"]
; Open #disk1# on click

[meterBarDisk1]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=10
Y=52
W=190
H=1

[meterLabelDisk2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=#disk2#\
LeftMouseUpAction=["#disk2#\"]

[meterValueDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1

[meterBarDisk2]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=10
Y=72
W=190
H=1

[meterLabelDisk3]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=#disk3#\
LeftMouseUpAction=["#disk3#\"]

[meterValueDisk3]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk3
MeasureName2=measureTotalDisk3
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1

[meterBarDisk3]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk3
X=10
Y=92
W=190
H=1
:great:
Thank you, i just noticed what i did wrong, Once again its a new learning curve for me.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3761
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Visions +

Post by eclectic-tech »

Diablorojo wrote:
December 31st, 2019, 6:01 pm
Thank you, i just noticed what i did wrong, Once again its a new learning curve for me.
Happy to help. We all started out the same way... keep learning! :thumbup:
User avatar
Diablorojo
Posts: 16
Joined: December 29th, 2019, 1:40 am

Re: Visions +

Post by Diablorojo »

eclectic-tech wrote:
December 31st, 2019, 9:18 pm
Happy to help. We all started out the same way... keep learning! :thumbup:
Thanks again for all the help,, Glad to be back in since i left in 2012 due to personal problems.. Will keep educating myself and get back in the groove.
:great: :thumbup:
User avatar
Diablorojo
Posts: 16
Joined: December 29th, 2019, 1:40 am

Re: Visions +

Post by Diablorojo »

jsmorley wrote:
December 31st, 2019, 1:27 pm
That seems weird though. There is no effect of daylight savings time or proximity to midnight that would ever make January 1 be on a Tuesday in 2020. They need to get their act together... They are using the wrong year. January 1, 2019 was on Tuesday. So since "today" it is still 2019, they are just extrapolating forward based on that. Lazy.. ;-)

In any case, it is right for me...



1.png
Still having the same problem with the date being wrong,, I have tried what i have learned,, no luck.
Capture.PNG
You do not have the required permissions to view the files attached to this post.