It is currently April 20th, 2024, 12:20 pm
Simple countdown timer
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Simple countdown timer
New version with MouseScroll working, but not perfect... yet!
Still can't figure out that RoundBar issue though, any ideas?
Still can't figure out that RoundBar issue though, any ideas?
- MuLab -
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Simple countdown timer
If I understood correctly what you want, adding either this:
Code: Select all
OnChangeAction=[!SetVariable MaxVal (#DefaultInitialValue#-[mTimer:]+[mTimerSet:])]
DynamicVariables=1
Code: Select all
IfCondition=(mTimerSet>0)
IfTrueAction=[!SetVariable MaxVal (#DefaultInitialValue#-[mTimer:]+[mTimerSet:])]
IfConditionMode=1
DynamicVariables=1
Basically, it's about changing the MaxValue option's value in [mTimer2] according to the time being set.
P.S. Normally, the first variant would be logical, but personally I have this slight distrust in how OnChangeAction works in relation with other things that happen in a skin, so I included a (not that logical, but feasible) alternative. Don't let my personal opinions change your mind though, choose what you think it's best.
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Simple countdown timer
Thanks for the solution.
The first one seems to work ok, so for now I'll stick to that.
The first one seems to work ok, so for now I'll stick to that.
- MuLab -
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Simple countdown timer
Latest code on this one:
Ok so everything seems to work ok wrt MouseScroll and the RoundBar, although I have one issue with Scroll updating being very sluggish. I just don't understand the need for such a high Update=50? It's just that other skins are set to Update=1000 and react instantly to the changes. I've tried adding [!UpdateMeter *] or Measure and [!Redraw]
Also, in the [Set] section there are bangs to [!EnableMeasure mTimer3][!EnableMeasure mTimer4], what exactly is this doing? The problem here is that changing these has no effect on playing the alarm or even acting on the Act variable. I have the Variables in order as balala described, so that the Act variable is after the others that it is set to. But this just won't work.
Btw, here's the batch file code I used to test Act=#CloseApps#
Also, in the [Set] section there are bangs to [!EnableMeasure mTimer3][!EnableMeasure mTimer4], what exactly is this doing? The problem here is that changing these has no effect on playing the alarm or even acting on the Act variable. I have the Variables in order as balala described, so that the Act variable is after the others that it is set to. But this just won't work.
Btw, here's the batch file code I used to test Act=#CloseApps#
Code: Select all
@echo
cls
taskkill /IM foobar2000.exe /T /F
exit
- MuLab -
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Simple countdown timer
Same here, I was wondering the same thing - that's why I said balala would probably offer more of an insight into these, since he's the original coder and all. That being said, he probably had some reason for that when he wrote the skins, but it's quite likely he forgot it after all these years - it would probably be the same for me in a similar scenario. After all, after just a couple of months writing some (more complex, I admit) code in my own skins, I had to start all over and read it and wondered "what/why the heck did I just did here at that time?!"sl23 wrote: ↑July 31st, 2021, 11:50 amI just don't understand the need for such a high Update=50? It's just that other skins are set to Update=1000 and react instantly to the changes. I've tried adding [!UpdateMeter *] or Measure and [!Redraw]
Also, in the [Set] section there are bangs to [!EnableMeasure mTimer3][!EnableMeasure mTimer4], what exactly is this doing? The problem here is that changing these has no effect on playing the alarm or even acting on the Act variable.
Bear in mind that this won't work to kill some (Micro...cough cough...$oft legit...I mean telemetry) processes, since it's not ran as an administrator. Even if you did, I'm not sure it will work for those cases (and the alternative is not so straightforward for a non-technical user). Of course, if it's only about foobar2000 and the like, it will do its job just fine.sl23 wrote: ↑July 31st, 2021, 11:50 amBtw, here's the batch file code I used to test Act=#CloseApps#Code: Select all
@echo cls taskkill /IM foobar2000.exe /T /F exit
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Simple countdown timer
Thanks for the feedback. Yeah I was kind of hoping balala would take a look at some point.
Regarding that batch file, I already discussed with jsmorley about that and he pointed me to the RunCommand plugin with some code, so that's sorted, just need to figure out how to get the timer to activate it!!!
Regarding that batch file, I already discussed with jsmorley about that and he pointed me to the RunCommand plugin with some code, so that's sorted, just need to figure out how to get the timer to activate it!!!
- MuLab -
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Simple countdown timer
I can take, but today had a more or less full day. However I thought Yincognito fixed your problem. What should I take a look to?
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Simple countdown timer
No problem, you are allowed a real life outside of this forum!
Yincognito solved the RoundBar issue. I'm onto the next one now
Latest code:
Essentially, I'm trying to understand how the [Set] section works as I can't get any alarm to sound or acts acted upon. The timer reaches zero and... that's it... nothing happens. What am I missing?
Also, this:
Yincognito solved the RoundBar issue. I'm onto the next one now
Latest code:
Also, this:
No rush balala, I appreciate the help when you have time to.I have one issue with Scroll updating being very sluggish. I just don't understand the need for such a high Update=50? It's just that my other skins are set to Update=1000 and react instantly to the changes. I've tried adding [!UpdateMeter *] or Measure and [!Redraw]
Last edited by sl23 on August 1st, 2021, 12:16 pm, edited 2 times in total.
- MuLab -
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Simple countdown timer
Let me know of that code as well. I have my own, it works perfectly, but since it's about PowerShell, is also slower (compared to CMD related alternatives), so if by any chance that code is fast AND effective, I'm interested in finding out more about the approach.