hello, i have project to make a rainmeter
so the first system that i want to make is a input count, so every "action" that has been registered will be added as a count numeric like, first action the result will be "1" second action the result will be "2" and third action the result will be "3" and etc
and the second system that i want to make is like a stopwatch that start from 0 but it will be counted as "ms" (1000ms = 1 second)
please tell me if its possible and if possible can you tell me how to make it?
thank you very much.
It is currently April 27th, 2024, 12:33 am
Input Count Rainmeter skins
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Input Count Rainmeter skins
Yes, definitely possible. You have to crate a variable which will be dynamically increased with one on every cycle and will also be written permanently to the [Variables] section. If you don't know how to do this, later I'll post a sample code for you.Mekurukito wrote: ↑September 30th, 2019, 9:13 am so the first system that i want to make is a input count, so every "action" that has been registered will be added as a count numeric like, first action the result will be "1" second action the result will be "2" and third action the result will be "3" and etc
Possible as well, however for a such thing you have to update at least a few measures and meters 1000 times per second, which is too much. For this you can use an ActionTimer plugin measure.Mekurukito wrote: ↑September 30th, 2019, 9:13 am and the second system that i want to make is like a stopwatch that start from 0 but it will be counted as "ms" (1000ms = 1 second)
I'd recommend a lower update, for instance to count only 100 times perseconds, so not on milliseconds basis, but on 10 milliseconds. Would be much more feasable.
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
Re: Input Count Rainmeter skins
thank you for the respond,balala wrote: ↑September 30th, 2019, 9:44 am Yes, definitely possible. You have to crate a variable which will be dynamically increased with one on every cycle and will also be written permanently to the [Variables] section. If you don't know how to do this, later I'll post a sample code for you.
Possible as well, however for a such thing you have to update at least a few measures and meters 1000 times per second, which is too much. For this you can use an ActionTimer plugin measure.
I'd recommend a lower update, for instance to count only 100 times perseconds, so not on milliseconds basis, but on 10 milliseconds. Would be much more feasable.
i dont how to make the first system, please send some code to me.
the second system,i understand and i already learn how to do "Action Timer", you can give me a code if you want to
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Input Count Rainmeter skins
Ok, but first please precise a little bit what have you thought to. What you mean by "input count"? What kind of input do you want to count? A few details please, before I start to write the needed code.Mekurukito wrote: ↑September 30th, 2019, 10:33 am i dont how to make the first system, please send some code to me.
For instance:Mekurukito wrote: ↑September 30th, 2019, 10:33 am the second system,i understand and i already learn how to do "Action Timer", you can give me a code if you want to
Code: Select all
[Rainmeter]
Update=-1
[Variables]
MSec=0
StartStop=0
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "MeterMilliseconds"][!Redraw]
[StringStyle]
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Forward,10,100
Forward=[!SetVariable MSec "(#MSec#+1)"]#U#
IfCondition=(#MSec#=100)
IfTrueAction=[!CommandMeasure "MeasureSlide" "Stop 1"][!SetVariable MSec "0"]#U#[!CommandMeasure "MeasureSlide" "Execute 1"]
DynamicVariables=1
[MeasureStartStop]
Measure=Calc
Formula=#StartStop#
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!CommandMeasure "MeasureSlide" "Execute 1"][!SetOption MeterStartStop Text "Stop"][!UpdateMeter "MeterStartStop"][!Redraw]
IfFalseAction=[!CommandMeasure "MeasureSlide" "Stop 1"][!SetOption MeterStartStop Text "Start"][!UpdateMeter "MeterStartStop"][!Redraw]
DynamicVariables=1
[MeterMilliseconds]
Meter=STRING
MeterStyle=StringStyle
X=0
Y=0
Text=#MSec#
DynamicVariables=1
[MeterStartStop]
Meter=STRING
MeterStyle=StringStyle
X=0r
Y=10R
LeftMouseUpAction=[!SetVariable StartStop "(1-#StartStop#)"][!UpdateMeasure "MeasureStartStop"]
DynamicVariables=1
[MeterReset]
Meter=STRING
MeterStyle=StringStyle
X=0r
Y=10R
Text=Reset
LeftMouseUpAction=[!SetVariable StartStop "0"][!SetVariable MSec "0"][!UpdateMeasure "MeasureStartStop"]#U#
Additional note: in Rainmeter those are not systems, but skins.
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
Re: Input Count Rainmeter skins
So by what i mean "input count" is like every click i do will count from 0, and it will be counted +1 each click.
So if i click 5 times it will be registered as "5".
If you can, make it like you can save and reset the count
So if i click 5 times it will be registered as "5".
If you can, make it like you can save and reset the count
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Input Count Rainmeter skins
Depends on what you mean by click. If the skin should count the click onto itself, this is possible. But if it should count any such action, no matter where have you clicked, well, this is not possible, unfortunately.Mekurukito wrote: ↑October 1st, 2019, 12:38 am So by what i mean "input count" is like every click i do will count from 0, and it will be counted +1 each click.
So if i click 5 times it will be registered as "5".
So, is it ok to register only the clicks onto the skin?
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
Re: Input Count Rainmeter skins
One more thing that i want to add.
Can you make "up time" for last actions, and it will count "59second" after that change into 1+minutes not "60 seconds" ?
Can you make "up time" for last actions, and it will count "59second" after that change into 1+minutes not "60 seconds" ?
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
Re: Input Count Rainmeter skins
Yes, just give me an example code, i have no idea how to make itbalala wrote: ↑October 1st, 2019, 6:21 am Depends on what you mean by click. If the skin should count the click onto itself, this is possible. But if it should count any such action, no matter where have you clicked, well, this is not possible, unfortunately.
So, is it ok to register only the clicks onto the skin?
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Input Count Rainmeter skins
Ok, first create a variable into the [Variables] section. Let's name it Count:Mekurukito wrote: ↑October 1st, 2019, 6:27 am Yes, just give me an example code, i have no idea how to make it
Code: Select all
[Variables]
Count=0
So add the following meter as first meter of your skin (before the first already existing meter):
Code: Select all
[MeterClick]
Meter=Image
SolidColor=0,0,0,1
X=0
Y=0
W=#CURRENTCONFIGWIDTH#
H=#CURRENTCONFIGHEIGHT#
LeftMouseUpAction=[!SetVariable Count "(#Count#+1)"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterShowClicks"][!Redraw]
DynamicVariables=1
Code: Select all
[MeterShowClicks]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Number of clicks so far:#CRLF##Count#
DynamicVariables=1
-
- Posts: 21
- Joined: July 8th, 2018, 6:09 am
Re: Input Count Rainmeter skins
well its kinda not worth it if it can only do 1 meters for every click.
How about make a calculation on the variable? if i use the first meter and the second meter, like 1(first)+1(second)=2?
this the project that i want to do, its Key Counting
and well its not really work out, i cant do it using Hotkey Plugin, this is the code
How about make a calculation on the variable? if i use the first meter and the second meter, like 1(first)+1(second)=2?
this the project that i want to do, its Key Counting
and well its not really work out, i cant do it using Hotkey Plugin, this is the code
Code: Select all
[Rainmeter]
Update=1000
[Variables]
Count=0
[A_Key]
Measure=Plugin
Plugin=HotKey
HotKey=A
KeyDownAction=[!SetVariable Count "(#Count#+1)"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterShowClicks"][!Redraw]
DynamicVariables=1
[MeterShowClicks]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Number of clicks so far:#CRLF##Count#
DynamicVariables=1