Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 487

Losing values after restart, how do I solve that the best way?

$
0
0
Hello.

I'm going gray soon...

I have made a small piece that calculates the time between a start time and the present time.

This works (it's probably not the best solution, but it works).

My problem occurs when the skin restarts. Then I lose correct value in "mStartingTime1".

I want to be able to save the value in "mStartingTime1" to a file that is loaded on startup to a variable. This variable replaces Measure.
Am I thinking crazy?
How should I attack this problem for me?
Grateful for any help.

\HLM
(Translated with Google translate from Swedish)

Code:

[Rainmeter]DynamicWindowSize=1Update=1000AccurateText=1[Metadata]Name=Resist the urge to smokeAuthor=HLMGBGVersion=1.0[Variables]hImg1=#@#Cig.png[MeterMainBOXborder]Meter=ImageSolidColor=222,222,222X=0Y=0W=260H=200[MeterVer]Meter=StringY=2X=2Text=1.0[MeterTitel]Meter=STRINGStringAlign=CENTERFontColor=140,140,150FontFace=Courier NewFontSize=13FontWeight=700AntiAlias=1Y=5X=130W=115H=18Text="Elapsed time since:";///////////////////// MEASURES //////////////////[mSkinStarted]Measure=TimeFormat=%F %XUpdateDivider=-1[mTimeNow]Measure=Time[mFullTimeNow]Measure=TimeFormat=%F %X[mStartingTime1]Measure=TimeUpdateDivider=-1[mStartingTime1b]Measure=TimeFormat=%F %XUpdateDivider=-1[mDiff1]Measure=TimeTimeStamp=([mTimeNow:]-[mStartingTime1:])DynamicVariables=1UpdateDivider=1[mDiffHours1]Measure=TimeTimeStamp=([mTimeNow:]-[mStartingTime1:])DynamicVariables=1Format=%HUpdateDivider=1[mDiffMinutes1]Measure=TimeTimeStamp=([mTimeNow:]-[mStartingTime1:])DynamicVariables=1Format=%MUpdateDivider=1[mDays1]Measure=UptimeFormat=%4!i! d SecondsValue=([mTimeNow:TimeStamp]-[mStartingTime1:TimeStamp])DynamicVariables=1;//////////////////////  METERS ////////////////[MeterImg1]Meter=ImageImageName=#hImg1#ToolTipType=0ToolTipText=Press here when you take a smokeY=30X=5W=50H=50LeftMouseUpAction=[!UpdateMeasure mStartingTime1] [!UpdateMeasure mStartingTime1b];------  temp -------[MeterDiff]Meter=StringMeasureName=mDiff1SolidColor=255,255,255FontFace=Courier NewStringAlign=RightY=90X=255W=250Text=Elapsed: %1;---------- \temp ----------[MeterDiffFull1]Meter=StringMeasureName=mDays1MeasureName2=mDiffHours1MeasureName3=mDiffMinutes1SolidColor=255,255,255FontFace=Courier NewStringAlign=RightY=50X=255W=180Text=%1ays %2 hours %3 min[MeterLastChange1]Meter=StringMeasureName=mStartingTime1bSolidColor=255,255,255FontFace=Courier NewStringAlign=RightY=110X=255W=250Text=LastChange: %1[MeterTime Now1]Meter=StringMeasureName=mFullTimeNowSolidColor=255,255,255FontFace=Courier NewStringAlign=RightY=130X=255W=250Text=Time Now: %1[MeterSkinStart]Meter=StringMeasureName=mSkinStartedSolidColor=255,255,255FontFace=Courier NewStringAlign=RightY=150X=255W=250Text=Skin Start: %1

Statistics: Posted by HLHM — Today, 2:56 am — Replies 1 — Views 36



Viewing all articles
Browse latest Browse all 487

Trending Articles