thanks a lot for this... It currently does ( as far as i can can see) what i want it to do... can you tell if the clock will reset or what happenes to it when i restart my pc? will it "still be running" restart from where it stopped or restart from 0?balala wrote:Here is another example. It uses many elements of jsmorley's code:You can easily modify the value of the Per variable, to get the needed period. Just take care that it's expressed into seconds.Code: Select all
[Rainmeter] Update=1000 LeftMouseUpAction=[!SetOption MeasureNow UpdateDivider "1"][!UpdateMeasure "MeasureNow"][!UpdateMeasure "MeasureThen"] BackgroundMode=2 SolidColor=0,0,0,1 [Variables] Per=9000 [MeasureThen] Measure=Time UpdateDivider=-1 [MeasureNow] Measure=Time UpdateDivider=-1 [MeasureDiff] Measure=Calc Formula=(( [MeasureNow:timestamp] - [MeasureThen:timestamp] ) % #Per# ) MinValue=0 MaxValue=#Per# DynamicVariables=1 [MeterClockFace] Meter=Image ImageName=#@#Images\ClockFace.png SolidColor=0,0,0,1 W=110 H=116 [MeterSecondsHand] Meter=ROUNDLINE MeasureName=MeasureDiff X=0 Y=0 W=110 H=116 LineLength=52 LineColor=247,220,129,255 LineWidth=2 AntiAlias=1 StartAngle=4.7124 RotationAngle=6.2832
Obviously you can replace the image of the clock face, through the ImageName option of the [MeterClockFace] meter. Just use the correct image name and path.
With this code you have to click to the skin to make it to start it counting. If you want it to start automatically when the skin is loaded (refreshed), just remove the LeftMouseUpAction option from the [Rainmeter] section, along with the UpdateDivider option of the [MeasureNow] measure.
It is currently March 28th, 2024, 9:43 am
Help me create a "different" clock
Re: Help me create a "different" clock
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help me create a "different" clock
If you leaved the code as I posted it above, you'll have to click again to start it. If you've modified it to make it to start automatically when the skin is loaded / refreshed, obviously it'll start counting. But from 0, it won't continue the previous "session".h3103 wrote:thanks a lot for this... It currently does ( as far as i can can see) what i want it to do... can you tell if the clock will reset or what happenes to it when i restart my pc? will it "still be running" restart from where it stopped or restart from 0?
How should it behave? Is this ok, or you'd like to modify it somehow?
Re: Help me create a "different" clock
i changed it up so it starts automaticly upon loading... it would have been really nice if the clock could have been to fit the time cycle upon starting my pc. If you no a wae to do this i would be really nice if you could try and change it up to that but otherwise this was also a lot of help i got and a lot of time i stole. So thanks for all of that.balala wrote:If you leaved the code as I posted it above, you'll have to click again to start it. If you've modified it to make it to start automatically when the skin is loaded / refreshed, obviously it'll start counting. But from 0, it won't continue the previous "session".
How should it behave? Is this ok, or you'd like to modify it somehow?
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help me create a "different" clock
Again, I'm sorry, but I don't really understand what you mean by
Sorry again for my lack...
You mean you'd like it to continue where it was, when the computer was shut down?h3103 wrote:it would have been really nice if the clock could have been to fit the time cycle upon starting my pc.
Sorry again for my lack...
Re: Help me create a "different" clock
i'd like it to be connected to the real time so that the result is as if it ran while my pc was shutdown. so if i turn off my pc for For example an hour and turn it back on the clock should have advanced by 40%balala wrote:Again, I'm sorry, but I don't really understand what you mean by
You mean you'd like it to continue where it was, when the computer was shut down?
Sorry again for my lack...
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help me create a "different" clock
Here is a bit modified code. Try it please:h3103 wrote:i'd like it to be connected to the real time so that the result is as if it ran while my pc was shutdown. so if i turn off my pc for For example an hour and turn it back on the clock should have advanced by 40%
Code: Select all
[Rainmeter]
Update=1000
LeftMouseDoubleClickAction=[!UpdateMeasure "MeasureThen"]
BackgroundMode=2
SolidColor=0,0,0,1
[Variables]
Per=9000
Time=
[MeasureThen]
Measure=Time
UpdateDivider=-1
OnChangeAction=[!WriteKeyValue Variables Time "[MeasureThen:timestamp]"][!SetVariable Time "[MeasureThen:timestamp]"]
DynamicVariables=1
[MeasureNow]
Measure=Time
[MeasureDiff]
Measure=Calc
Formula=(( [MeasureNow:timestamp] - #Time# ) % #Per# )
MinValue=0
MaxValue=#Per#
DynamicVariables=1
[MeterClockFace]
Meter=Image
ImageName=#@#Images\ClockFace.png
SolidColor=0,0,0,1
W=110
H=116
[MeterSecondsHand]
Meter=ROUNDLINE
MeasureName=MeasureDiff
X=0
Y=0
W=110
H=116
LineLength=52
LineColor=247,220,129,255
LineWidth=2
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
Obviously you can again modify the Per variable, as described before.
Does this fit your needs?
Re: Help me create a "different" clock
Even tho i dont quite understand what you did it works the intended way. I thank you a thousand timesbalala wrote:Here is a bit modified code. Try it please:When you first load the skin, it won't work. With a double click, it starts and continuously counts, even if you restart the computer / unload, then load the skin. You can restart it from 0 with another double click.Code: Select all
[Rainmeter] Update=1000 LeftMouseDoubleClickAction=[!UpdateMeasure "MeasureThen"] BackgroundMode=2 SolidColor=0,0,0,1 [Variables] Per=9000 Time= [MeasureThen] Measure=Time UpdateDivider=-1 OnChangeAction=[!WriteKeyValue Variables Time "[MeasureThen:timestamp]"][!SetVariable Time "[MeasureThen:timestamp]"] DynamicVariables=1 [MeasureNow] Measure=Time [MeasureDiff] Measure=Calc Formula=(( [MeasureNow:timestamp] - #Time# ) % #Per# ) MinValue=0 MaxValue=#Per# DynamicVariables=1 [MeterClockFace] Meter=Image ImageName=#@#Images\ClockFace.png SolidColor=0,0,0,1 W=110 H=116 [MeterSecondsHand] Meter=ROUNDLINE MeasureName=MeasureDiff X=0 Y=0 W=110 H=116 LineLength=52 LineColor=247,220,129,255 LineWidth=2 AntiAlias=1 StartAngle=4.7124 RotationAngle=6.2832
Obviously you can again modify the Per variable, as described before.
Does this fit your needs?
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help me create a "different" clock
You're welcome. Test it a bit deeper and if you have any question, please let me know.