Comprehensive Stopwatch & Countdown Timer

OBS Lua Comprehensive Stopwatch & Countdown Timer 5.8

GrumpyDog

Member
If there is anything specific I can test to help let me know, it appears to be an issue on some installations only so as I have one of the duff ones I might be able to find something. So far nothing shows up in the logs.
Thank you for the offer, that is really awesome of you. If we identify any issue within the script logic then I am happy to work towards a solution but like you pointed out, it may be a OBS core/OS Platform issue. If the issue can be replicated we can always look at reporting it to the devs? Would be great if you can note where and how you encounter any issues? Thanks again!
 

Timboxyz

Member
Thank you for the offer, that is really awesome of you. If we identify any issue within the script logic then I am happy to work towards a solution but like you pointed out, it may be a OBS core/OS Platform issue. If the issue can be replicated we can always look at reporting it to the devs? Would be great if you can note where and how you encounter any issues? Thanks again!
Any time I have a countdown, which behaves properly on Preview, Main is always only the time at which I cut the scene up. That much is entirely consistent.
 

Attachments

  • screenS.gif
    screenS.gif
    627.7 KB · Views: 96

Seamas73

New Member
Script version 5.6. In the script settings, the time countup is activated when the visibility of the text source "Stopwatch" is turned on; the reset of the timer values is set to "auto". In the OBS settings, turning on/off the visibility of the Stopwatch is set to hotkeys combination Ctrl+Shift+T, and pausing/resuming time counting is set to Alt+Shift+T.
When I press Ctrl+Shift+T to turn on the visibility of the Stopwatch source, the source becomes visible and the countup automatically resets and starts. When I press to pause the timer, the timer is paused, and when I press it again, it resumes counting. After turning off the visibility of the Stopwatch using the keys, the stopwatch disappears and the countup stops.
If, when the visibility of the Stopwatch source is turned off, I press Alt+Shift+T instead Ctrl+Shift+T, the Stopwatch visibility turns on and the time countup starts, but the next pressing Alt+Shift+T doesn't pausing and resuming the countup even after turning off and on again visibility of the Stopwatch source until I reload the script somehow.
It’s good that I can turn on the visibility of the Stopwatch and start the countdown not only by pressing Ctrl+Shift+T, but also by pressing Alt+Shift+T, but I would like that it not to break the ability to pause the time countdup. Can developer fix it, or do I need to strictly follow the order of using hotkeys and turn on/off the visibility of the Stopwatch and therefore start and stop the timing only by pressing the Ctrl+Shift+T, and use the Alt+Shift+T keys only to pause/resume the timing?
 

Seamas73

New Member
When I press to pause the timer, the timer is paused, and when I press it again, it resumes counting. After turning off the visibility of the Stopwatch using the keys, the stopwatch disappears and the countup stops.
I meant "When I press Alt+Shift+T to pause the timer, the timer is paused, and when I press Alt+Shift+T again, it resumes counting. After turning off the visibility of the Stopwatch using the Ctrl+Shift+T keys, the stopwatch disappears and the countup stops".
 

Seamas73

New Member
Thanks, version 5.7 works correctly. Hotkey combination Alt+Shift+T pauses and resumes time countup even when I start stopwatch by pressing Alt+Shuft+T instead of Ctrl+Shift+T.
 

christhevr

New Member
cannot figure out a way to start a countdown timer from above 24 hours, I have used the custom time format using this "$H:$M:$S,$F{H100}" but it still prevents me from using a count down mode and entering a time above 24 hours, i need it to count down from 33 hours, 33 minutes, 33 seconds. with count up it works fine but I would prefer it to count down as it appears nicer for people to understand how much time I have left. any thoughts?

1704230530039.png
 

GrumpyDog

Member
cannot figure out a way to start a countdown timer from above 24 hours, I have used the custom time format using this "$H:$M:$S,$F{H100}" but it still prevents me from using a count down mode and entering a time above 24 hours, i need it to count down from 33 hours, 33 minutes, 33 seconds. with count up it works fine but I would prefer it to count down as it appears nicer for people to understand how much time I have left. any thoughts?

View attachment 100578
I have to check to confirm, but with the settings you defined, you should be able to enter ‘33’ in the ‘hour’ input field because you have ‘$H:$M:$S,$F{H100}’ defined correctly. I suspect though, if with these settings it does not go above ‘23’ then you discovered a bug, in which case I will resolve as quickly as possible.
 

JackFoley

New Member
I'm trying to use this script as a stopwatch for football games. How can I set it so that when the game time hits 60:00, it doesn't go 1:00:00 so that it can go to 90 minutes and show it as 90:00?

Thanks in advance
 

GrumpyDog

Member
I'm trying to use this script as a stopwatch for football games. How can I set it so that when the game time hits 60:00, it doesn't go 1:00:00 so that it can go to 90 minutes and show it as 90:00?

Thanks in advance
This is possible. To achieve this you need to set the ‘Timer Format’ to ‘Custom’. When you do so, a new input field will be revealed where you define a custom format. You will probably want to use a format such as

$M:$S,$F{M90}

You should see this YouTube tutorial which will show you how to do so around 01:50

Remember to review, like and subscribe
 

ObnoxiousPotato

New Member
Using Version 5, Countdown type. The RESET button initially works after adding and setting up the script, but then becomes NON-FUNCTIONAL (does not reset the timer to the configured starting time value: 00:25:00) at some later point in time (I have not been able to pin point the exact set of circumstances which causes the non-functional RESET function). However, if I delete the script and then re-add and set it up, it will work again for a while until it stops working. The START/PAUSE button appears to always work (as long as the remaining timer value does not reach 00:00:00). Note: A previous version of the script worked very well for me, but had to update to the latest version due to having to update other software on my system (i.e., OBS 30.0.2 64bit, StreamElements.LIVE, and the more recent Windows 10 Updates). I've attached some files showing how I am using the script. I also have Hot Keys defined for the RESET, START/PAUSE, and Add "Set 1" seconds to the timer (using this as a kind of snooze function).
 

Attachments

  • settings_01.png
    settings_01.png
    24.4 KB · Views: 34
  • settings_02.png
    settings_02.png
    33.2 KB · Views: 34
  • settings_03.png
    settings_03.png
    33.6 KB · Views: 33
  • settings_04.png
    settings_04.png
    9 KB · Views: 30

ObnoxiousPotato

New Member
Using Version 5, Countdown type. The RESET button initially works after adding and setting up the script, but then becomes NON-FUNCTIONAL (does not reset the timer to the configured starting time value: 00:25:00) at some later point in time (I have not been able to pin point the exact set of circumstances which causes the non-functional RESET function). However, if I delete the script and then re-add and set it up, it will work again for a while until it stops working. The START/PAUSE button appears to always work (as long as the remaining timer value does not reach 00:00:00). Note: A previous version of the script worked very well for me, but had to update to the latest version due to having to update other software on my system (i.e., OBS 30.0.2 64bit, StreamElements.LIVE, and the more recent Windows 10 Updates). I've attached some files showing how I am using the script. I also have Hot Keys defined for the RESET, START/PAUSE, and Add "Set 1" seconds to the timer (using this as a kind of snooze function).
When performing a RESET when the timer is still counting down, I consistently get a "Failed to call timer_cb for timer_call:attempt to call a nil value" message in the debug log. See attached image. The timer remains functional (subsequent START/PAUSE and RESET functions still work correctly).
 

Attachments

  • debug_message.png
    debug_message.png
    6.1 KB · Views: 24

ObnoxiousPotato

New Member
Every once in a while, this message is output to the debug log when RESETTING the timer while it has not yet elapsed: "[StopWatch.lua] Failed to call timer_cb for timer_call: attempt to call a number value".

Note: Since I last re-added the Advanced Stopwatch script, configured it, and redefined the 3 HotKeys which I use, the script is still functioning correctly. Will do my best to record what events occurred prior to encountering the situation where the RESET function no longer works (i.e., the remaining time is not set back to 00:25:00).
 

GrumpyDog

Member
Using Version 5, Countdown type. The RESET button initially works after adding and setting up the script, but then becomes NON-FUNCTIONAL (does not reset the timer to the configured starting time value: 00:25:00) at some later point in time (I have not been able to pin point the exact set of circumstances which causes the non-functional RESET function). However, if I delete the script and then re-add and set it up, it will work again for a while until it stops working. The START/PAUSE button appears to always work (as long as the remaining timer value does not reach 00:00:00). Note: A previous version of the script worked very well for me, but had to update to the latest version due to having to update other software on my system (i.e., OBS 30.0.2 64bit, StreamElements.LIVE, and the more recent Windows 10 Updates). I've attached some files showing how I am using the script. I also have Hot Keys defined for the RESET, START/PAUSE, and Add "Set 1" seconds to the timer (using this as a kind of snooze function).
Based on the screenshots you sent you are using an old version. Can you please download the latest version 5.7.1 as the issues you reported have all been reported and addressed. If you find the issues are still present after you updated to the latest version, please let me know.
 

ObnoxiousPotato

New Member
Based on the screenshots you sent you are using an old version. Can you please download the latest version 5.7.1 as the issues you reported have all been reported and addressed. If you find the issues are still present after you updated to the latest version, please let me know.
Thanks! Sorry about the false alarm. Was in a hurry trying to figure out an OBS Studio crashing problem, and apparently didn't dig deep enough to locate the latest version within your (midnight-studios/obs-lua) GitHub main branch listing. It appears the 5.7.1 version is working OK for me thus far. Will let you know if I run into any major issues. Thanks again! ;)
 
Top