It is currently April 25th, 2024, 10:07 am

once again i ask for help

Get help with creating, editing & fixing problems with skins
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: once again i ask for help

Post by brax64 »

balala wrote: October 5th, 2020, 6:20 pm ...
I hope you see now the difference between these values.
Hi balala,
Thanks for taking the time to dive deep in this rabbit hole! :D

I'm totally aware of the distinction and associated big difference it makes in the result of using the TimeStamp notation or the simple column notation.
There's a little detail that perhaps, I didn't enfatized in the proper way, at the base of the whole thing, lets try again:

In my specific case I willingly left the time measure without a time format because I'm using it as the base for a "counter"with no output to a meter or such; and its use after in the Calc measure, is intended to be just a "number" that update itself automatically, therefore I can use the simple column notation instead of the TimeStamp one being sure that the result it will be undoubtedly correct...

Code: Select all

[GetTime]
Measure=Time

[DaysCounter]
Measure=Calc
Formula=(86400-([GetTime:]%86400))
DynamicVariables=1
IfCondition=([DaysCounter] = 86400)
So I don't understand why the time cannot be seen as just a number and treated as such... In my coding the notation I used, it works perfectly fine, taking into the account the contest in which and how it is used... hope to have explained myself... :)
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: once again i ask for help

Post by balala »

brax64 wrote: October 5th, 2020, 6:57 pm So I don't understand why the time cannot be seen as just a number and treated as such... In my coding the notation I used, it works perfectly fine, taking into the account the contest in which and how it is used... hope to have explained myself... :)
It definitely can be seen, especially in this case. And can be used as you've used it, with no fear, because in your (this) particular case [GetTime:] and [GetTime:TimeStamp] are the same. There is a difference ONLY if you have a Format set on the Time measure (as you see in my example above, where a Format=%S has been applied on the [MeasureSec] Time measure). If no Format option is applied, the numeric value of the Time measure coincide with its time stamp.
Sorry if I confused you, was not my intention, just wanted you to see the difference between the numeric section variable and the :TimeStamp section variable, because in many (most?) cases, the time stamp form is required.
Again, your code is perfect in this case, you don't have to modify it in no way.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: once again i ask for help

Post by brax64 »

balala wrote: October 5th, 2020, 7:15 pm Sorry if I confused you, was not my intention, just wanted you to see the difference between the numeric section variable and the :TimeStamp section variable, because in many (most?) cases, the time stamp form is required.
Phew! I'm relieved!
For a moment I got scared because I start to think that I was missing or not understanding something; as I said earlier I'm still learning all the countless nuances that Rainmeter coding has, and considering that you and jsmorley are, at lest for me, some of the "guru" I follow blindly, any of your objection/observation can't simply be wrong I immediately start to doubt myself and ask for clarification...

Thanks again for yours priceless effort trying to shade some light in the darkness!!! :D
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: once again i ask for help

Post by balala »

brax64 wrote: October 5th, 2020, 7:35 pm Phew! I'm relieved!
For a moment I got scared because I start to think that I was missing or not understanding something;
Ok, I'm glad you got it clarified.
brax64 wrote: October 5th, 2020, 7:35 pm as I said earlier I'm still learning all the countless nuances that Rainmeter coding has,
We all do, all the time, for sure. There always are a lot of details to take into account...
brax64 wrote: October 5th, 2020, 7:35 pm and considering that you and jsmorley are, at lest for me, some of the "guru" I follow blindly, any of your objection/observation can't simply be wrong I immediately start to doubt myself and ask for clarification...
Thank you for the appreciations, but I doubt me personally would be a "guru". I definitely don't consider myself being so.
And I recommend never (but never) follow blindly my advices. I, as anyone out there, make mistakes from time to time. There always is better to think about what I advice, because my advices might be wrong, at least in some cases. I'm trying not to make (great) mistakes, but you never know. Unfortunately...
brax64 wrote: October 5th, 2020, 7:35 pm Thanks again for yours priceless effort trying to shade some light in the darkness!!! :D
You're welcome. I'm always happy to help, when I can.
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

Re: once again i ask for help

Post by aredhone »

So hi im back hope this thingy is still active but i got a new problem i have been testing the script for the last phew days and i put the variable MainTank on 25 because thats how long my main tank has been active
but the last days it keeps switching between 25 and 26
i dont know what the problem is and i dont know how to fix it so im gona try the </> thing again

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=160
SkinHeight=327

[Variables]
@include=#@#\INC\DayCount.inc

[GetTime]
Measure=Time

[DaysCounter]
Measure=Calc
Formula=([GetTime:]%86400)
DynamicVariables=1
IfCondition=([DaysCounter] = (3600*14))
IfTrueAction=[!SetVariable DaysMainTank (#DaysMainTank#+1)][!SetVariable DaysNanoTank (#DaysNanoTank#+1)][!WriteKeyValue Variables DaysMainTank (#DaysMainTank#+1) "#@#DayCount.inc"][!WriteKeyValue Variables DaysNanoTank (#DaysNanoTank#+1) "#@#DayCount.inc"][!UpdateMeterGroup Tanks][!Redraw]

[BackgroundClock]
Meter=Shape
Shape=Rectangle 1,1,158,58,10,10 | Fill Color 110,110,110 | Stroke Color 0,0,0 | StrokeWidth 3

[MeasureDate]
Measure=Time
Format=%a - %b - %e

[Measure24HrTime]
Measure=Time
Format=%H:%M,%S

[Date/TimeStyle]
FontFace=#ff1#
FontSize=12
FontColor=#C1#
StringAlign=Center
StringStyle=Bold
AntiAlias=1
Group=Tanks
DynamicVariables=1


[Date]
Meter=String
MeasureName=MeasureDate
MeterStyle=Date/TimeStyle
X=80
Y=10
Text="%1"

[Clock]
Meter=String
MeasureName=Measure24HrTime
MeterStyle=Date/TimeStyle
FontSize=18
X=80
Y=30
Text="%1"

[Background]
Meter=Shape
Shape=Rectangle 1,1,158,198,10,10 | Fill Color 110,110,110 | Stroke Color 0,0,0 | StrokeWidth 3
Y=63

[LabelStyle]
FontFace=#ff1#
FontSize=12
FontColor=#C1#
StringAlign=Center
StringStyle=Bold
AntiAlias=1
Group=Tanks
DynamicVariables=1
Y=70

[DisplayStyle]
FontFace=#ff2#
FontSize=80
FontColor=#C2#
StringAlign=CenterCenter
StringStyle=Bold
AntiAlias=1
Group=Tanks
DynamicVariables=1
Y=170

[MainTankLabel]
Meter=String
MeterStyle=LabelStyle
Text=Main Tank
X=#XPos1#

[MainTankDisplay]
Meter=String
MeterStyle=DisplayStyle
Text=#DaysMainTank#
X=#XPos1#

[NanoTankLabel]
Meter=String
MeterStyle=LabelStyle
Text=Nano Tank
X=#XPos2#

[NanoTankDisplay]
Meter=String
MeterStyle=DisplayStyle
Text=#DaysNanoTank#
X=#XPos2#

[TankSwitch]
Meter=String
FontFace=#ff2#
FontSize=8
FontColor=#C2#
SolidColor=0,0,0,1
StringAlign=Left
StringStyle=Bold
AntiAlias=1
Text=Tank
X=10
Y=240
LeftMouseUpAction=[!CommandMeasure Slider "Execute #State#"]
DynamicVariables=1

[Slider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=wait 16 | Repeat HideMain,20,16 | Repeat ShowNano,20,16
HideMain=[!SetVariable XPos1 "(Clamp(#XPos1#-20,-80,80))"][!HideMeter ResetMainTank]#U#
ShowNano=[!SetVariable XPos2 "(Clamp(#XPos2#+20,-80,80))"][!ShowMeter ResetNanoTank][!SetVariable State "2"]#U#
ActionList2=wait 16 | Repeat HideNano,20,16 | Repeat ShowMain,20,16
HideNano=[!SetVariable XPos2 "(Clamp(#XPos2#-20,-80,80))"][!HideMeter ResetNanoTank]#U#
ShowMain=[!SetVariable XPos1 "(Clamp(#XPos1#+20,-80,80))"][!ShowMeter ResetMainTank][!SetVariable State "1"]#U#
DynamicVariables=1

[ResetStyle]
FontFace=#ff2#
FontSize=8
FontColor=#C2#
SolidColor=0,0,0,1
StringAlign=Right
StringStyle=Bold
AntiAlias=1
X=150
Y=r

[ResetMainTank]
Meter=String
MeterStyle=ResetStyle
Text=Reset Main
LeftMouseUpAction=[!SetVariable DaysMainTank 1][!WriteKeyValue Variables DaysMainTank 1 "#@#DayCount.inc"]

[ResetNanoTank]
Meter=String
MeterStyle=ResetStyle
Hidden=1
Text=Reset Nano
LeftMouseUpAction=[!SetVariable DaysNanoTank 1][!WriteKeyValue Variables DaysNanoTank 1 "#@#DayCount.inc"]

[BackgroundTask]
Meter=Shape
Y=266
Shape=Rectangle 1,1,158,#TaskSize#,10,10 | Fill Color 110,110,110 | Stroke Color 0,0,0 | StrokeWidth 3
Group=Clean

[TaskStyle]
FontFace=#ff2#
FontSize=30
FontColor=#C2#
SolidColor=0,0,0,1
StringAlign=Right
StringStyle=Bold
AntiAlias=1
X=125
Y=10r

[Task]
Meter=String
MeasureName=MeasureDay
MeasureName2=MeasureOddEvenDay
MeterStyle=TaskStyle
Group=Tanks
Text="%2"

[TaskClean]
Meter=String
FontFace=#ff2#
FontSize=30
FontColor=#C2#
SolidColor=0,0,0,1
StringAlign=Right
StringStyle=Bold
AntiAlias=1
Text=Clean
Group=Tanks | Clean1
Hidden=0
X=10r
Y=40r

[MeasureDay]
Measure=Time
Format=%#j

[MeasureOddEvenDay]
Measure=Calc
Formula=MeasureDay%2
Substitute="0":"Free","1":"Feed"

[MeasureClean]
Measure=Time
Format=%A, %B 
IfMatch=#DayCheck#
IfMatchAction=[!SetVariable TaskSize 94][!WriteKeyValue Variables TaskSize "94" "#@#\INC\DayCount.inc"][!UpdateMeterGroup Clean][!ShowMeterGroup Clean1][!Redraw *]
IfNotMatchAction=[!SetVariable TaskSize 58][!WriteKeyValue Variables TaskSize "58" "#@#\INC\DayCount.inc"][!UpdateMeterGroup Clean][!HideMeterGroup Clean1][!Redraw *]

Code: Select all

[Variables]

DaysMainTank=25
DaysNanoTank=12
TaskSize=94
TimeBuffer=3600
DayCheck=Wednesday
State=1
U=[!UpdateMeasure Slider][!UpdateMeterGroup Tanks][!Redraw]
ff1=Good Times
ff2=Arial
C1=30,30,30
C2=0,0,0
XPos1=80
XPos2=-80

I hope i did the </> right this time
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: once again i ask for help

Post by balala »

aredhone wrote: October 7th, 2020, 7:49 pm So hi im back hope this thingy is still active but i got a new problem i have been testing the script for the last phew days and i put the variable MainTank on 25 because thats how long my main tank has been active
but the last days it keeps switching between 25 and 26
I suppose the MainTank variable is in fact DaysMainTank, right?
If I am right, this variable is incremented each day at 14:00 (2:00 PM), but is never decremented, or when you click the Reset Main "button", it is reset to 1. Otherwise the code has no bangs to decrease the variable. So what do you mean by the following sentence?
aredhone wrote: October 7th, 2020, 7:49 pm it keeps switching between 25 and 26
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: once again i ask for help

Post by brax64 »

aredhone wrote: October 7th, 2020, 7:49 pm So hi im back ...
Hi aredhone,

You messed up the Variables updating process...
You changed the location for the DayCount.inc file with this

Code: Select all

[Variables]
@include=#@#\INC\DayCount.inc
That's also wrong 'cause need to be written @include=#@#INC\DayCount.inc (without the "\" before INC)
Moreover you never changed that location where all the !WriteKeyValue bangs are executed, thus no variables can be rewritten...

P.S.
I've the skin code perfectly functioning with the added date I saw you implemented. let me know if you want me to post it or if you want to play with your modified one for the sake of learning...
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

Re: once again i ask for help

Post by aredhone »

i think i get my mistake i just need to put the daycount.inc in the recource folder and not an extra folder or i need to change all the write key values

if thats correct then im gona place the daycount.inc back in the recource folder
and change the include thin back to include=#@#/daycount.inc and try again

and what i ment with the 25 / 26
this morning it stood on 25 later the day it turned to 26 and then the evening it was 25 again
realy weird but if its fixed with moving back the inc im gona try that

thanks again this is a great way of learing xD
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: once again i ask for help

Post by brax64 »

aredhone wrote: October 7th, 2020, 9:30 pm i think i get my mistake i just need to put the daycount.inc in the recource folder and not an extra folder or i need to change all the write key values

if thats correct then im gona place the daycount.inc back in the recource folder
and change the include thin back to include=#@#/daycount.inc and try again

and what i ment with the 25 / 26
this morning it stood on 25 later the day it turned to 26 and then the evening it was 25 again
realy weird but if its fixed with moving back the inc im gona try that

thanks again this is a great way of learing xD
has to be written include=#@#DayCount.inc without "/" forward slash
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

Re: once again i ask for help

Post by aredhone »

thanks brax i did

its like 1 in the moring here so im gona check tomorow if it works
there is alot i have learned from this skin
so once again thanks
i have no idea if this is an easy skin or not but to me it seems quite complicated
and i think the most advanced thing tryde to expand on
since the old gta san andreas moding