Not sure, I assume if you create a skin using exactly my code above, it works?Krainz wrote:Any ideas on how to make this limit work? For me not even the one that stops it from going negative is working, which should be this one, posted above:
It feels like I'm forgetting something. Maybe DynamicVariables?
It is currently March 28th, 2024, 9:09 am
[Solved] Is it possible to make a "Click Counter"?
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Solved] Is it possible to make a "Click Counter"?
Re: [Solved] Is it possible to make a "Click Counter"?
Yeah, I always use your exact code to test, and it didn't stop at 0. Did it work for you?
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Solved] Is it possible to make a "Click Counter"?
It sure does. Make sure you are running a recent version of Rainmeter. I would recommend the latest beta from http://rainmeter.net.Krainz wrote:Yeah, I always use your exact code to test, and it didn't stop at 0. Did it work for you?
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[ClickLeftCounter]
Measure=Calc
Formula=ClickLeftCounter + 1
Disabled=1
UpdateDivider=-1
OnUpdateAction=[!SetOption CurrentX Formula "([CurrentX] + 1)"][!UpdateMeasure CurrentX][!UpdateMeter *][!Redraw]
[ClickRightCounter]
Measure=Calc
Formula=ClickRightCounter + 1
Disabled=1
UpdateDivider=-1
OnUpdateAction=[!SetOption CurrentX Formula "([CurrentX] - 1)"][!UpdateMeasure CurrentX][!UpdateMeter *][!Redraw]
[CurrentX]
Measure=Calc
Formula=0
UpdateDivider=-1
IfCondition=CurrentX < 0
IfTrueAction=[!SetOption CurrentX Formula "0"][!UpdateMeasure CurrentX][!UpdateMeter *][!Redraw]
[MeterImage]
Meter=Image
W=50
H=50
X=[CurrentX]
Y=0
SolidColor=152,235,131,255
DynamicVariables=1
[ShowClicks]
Meter=String
X=0r
Y=0R
FontColor=255,255,255,255
FontFace=Segoe UI
FontSize=17
StringEffect=Shadow
FontEffectColor=0,0,0,255
SolidColor=0,0,0,1
AntiAlias=1
Text=Left: [ClickLeftCounter] Right: [ClickRightCounter] CurrentX: [CurrentX]
DynamicVariables=1
LeftMouseUpAction=[!EnableMeasure ClickLeftCounter][!UpdateMeasure ClickLeftCounter]
RightMouseUpAction=[!EnableMeasure ClickRightCounter][!UpdateMeasure ClickRightCounter]
Re: [Solved] Is it possible to make a "Click Counter"?
Yeah, installing the beta version made it work. Thanks!
- mattnicholas
- Posts: 3
- Joined: December 19th, 2020, 8:52 am
Re: [Solved] Is it possible to make a "Click Counter"?
hey.. firstly, thanks for this thread, it helped me a lot in making my own click counter in rainmeter. One last thing that I want to add little animation and design improvements that make the green square where user clicks look like a real button. I saw something exactly same on this click counter I am good with algorithms but not so good with design stuff. Can any of the bright minds here help me with this? Thanks in advance.
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Solved] Is it possible to make a "Click Counter"?
This is not a Rainmeter skin, right?mattnicholas wrote: ↑December 20th, 2020, 5:44 am I saw something exactly same on this click counter
Since this topic is more than six years old, first please post the exact code you are using. Also let us know what exactly do you want to achieve, because I'm not exactly sure what does this mean:mattnicholas wrote: ↑December 20th, 2020, 5:44 am Can any of the bright minds here help me with this?
What kind of animation do you want? And what design improvements? Not sure...mattnicholas wrote: ↑December 20th, 2020, 5:44 am One last thing that I want to add little animation and design improvements that make the green square where user clicks look like a real button.
Re: [Solved] Is it possible to make a "Click Counter"?
I am pretty spiffy with photoshop - a rough as guts mspaint sketch and I'll try to make something you'll like - i hope.mattnicholas wrote: ↑December 20th, 2020, 5:44 am hey.. firstly, thanks for this thread...
Can any of the bright minds here help me with this? Thanks in advance.
- mattnicholas
- Posts: 3
- Joined: December 19th, 2020, 8:52 am
Re: [Solved] Is it possible to make a "Click Counter"?
I want to replicate the button like this one (including the pressing animation).
- Attachments
-
- mattnicholas
- Posts: 3
- Joined: December 19th, 2020, 8:52 am
Re: [Solved] Is it possible to make a "Click Counter"?
I just posted the GIF of how I want it. I am using the exact code provided by @jsmorleybalala wrote: ↑December 20th, 2020, 4:50 pm This is not a Rainmeter skin, right?
Since this topic is more than six years old, first please post the exact code you are using. Also let us know what exactly do you want to achieve, because I'm not exactly sure what does this mean:
What kind of animation do you want? And what design improvements? Not sure...
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[ClickCounter]
Measure=Calc
Formula=ClickCounter+1
Disabled=1
UpdateDivider=-1
[ShowClicks]
Meter=String
MeasureName=ClickCounter
X=0
Y=0
FontColor=255,255,255,255
FontFace=Segoe UI
FontSize=17
StringEffect=Shadow
FontEffectColor=0,0,0,255
SolidColor=0,0,0,1
AntiAlias=1
Text=Counter is: %1
LeftMouseUpAction=[!EnableMeasure ClickCounter][!UpdateMeasure ClickCounter][!UpdateMeter ShowClicks][!Redraw]
Re: [Solved] Is it possible to make a "Click Counter"?
That's fairly basic. Using Shape meters for that should be better than using an image - that reduces dependencies for image files etc.mattnicholas wrote: ↑December 21st, 2020, 6:58 am I want to replicate the button like this one (including the pressing animation).
The toggle effect would simply be a similar shape being toggled using !togglemetergroup between the two shapes.
Give it a whirl, as I think you're up to the coding task of that desired effect. IIRC the Shape section of the manual uses a very similar example you can work from.