topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday October 25, 2021, 6:13 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [DONE] Command line timer for a computer with screen off, like a better pause.ex  (Read 1563 times)

user45454

  • Participant
  • Joined in 2010
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
What I want: A command line timer for a computer with the screen off, basically a better pause.exe that accepts hour and minutes as input.
Why: To let me know when the washing machine and dryer are done.

Use case
On a computer that has the screen turned off
1) I Press a hotkey that launch a bat file.
2) Bat file Plays a wav file (So I know I started the right bat file).
3a) Timer.exe is started and waiting for my input                                                                          <------------- This is where I need your help.
3c) I input the time with H MM (Example:132=1 hour & 32 min) and press return.                          <------------- This is where I need your help.
3b) The program plays a wave-file (or beeps) to let me know it accepted the input and start the countdown <------------- This is where I need your help.
3c) When the countdown is done the program exists and the bat file can continue.                          <------------- This is where I need your help.
4) The .bat file makes a HTTP call via curl to my IoT-server that in turn will notify me via a voice message on the speakers and a Telegram notification.

I will make two .bat-files, one for washer and one for the dryer.
I'm thinking that an enhanced version of pause.exe or timeout.exe should do the trick.
« Last Edit: June 25, 2021, 03:21 PM by user45454 »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 323
  • Call me Vic!
    • View Profile
    • PublicDomainWeekly.com
    • Read more about this member.
    • Donate to Member
Hi & thanks for your request! It's all possible via .exe :)

4) The .bat file makes a HTTP call via curl to my IoT-server

What's the target IoT server's IP? (to set as default address for your use case)

Cheers!
✔️ New releases: PublicDomainWeekly.com

🎁 One-time support: Paypal @ www.paypal.com/paypalme/victorvls

❤️ Steady support: Patreon @ www.patreon.com/publicdomain

Thanks & keep on rocking!
Email/Paypal: publicdomainvicgmail.com

Coding: GingerTG v0.1.0
--Victor
« Last Edit: April 01, 2021, 10:40 AM by publicdomain »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
How about a generic GUI driven calendar tool that support date warnings (birthdays etc) and timer based things, that can perform execution tasks, like calling a .cmd file, or add individual tasks (commands) like a .cmd replacement?
Click icon to quick enable timer and then you turn off screen...
Editor to create tasks as usable preset would be included.
Hotkeys for preset are also an option.

user45454

  • Participant
  • Joined in 2010
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
I kind of solved it with the following.

set /P time2="Set delay"
start /wait HourglassPortable.exe %time2%

App used: https://chris.dziemb....com/apps/hourglass/

The problem is I need to write "H" to get hourglass to understand that I want hours.
Example: "1h25" will get me 1 hour and 25 minutes.

It would be nice to be able to skip the "H" and also have it all in comand prompt.

user45454

  • Participant
  • Joined in 2010
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Hi & thanks for your request! It's all possible via .exe :)

4) The .bat file makes a HTTP call via curl to my IoT-server

What's the target IoT server's IP? (to set as default address for your use case)

Cheers!
-publicdomain (March 31, 2021, 11:26 PM)

Hi,
 :)
Local server, 192.168.0.232.
But I only need the timer part, the call to ther server can be done with curl.
I attached a picture of what im thinking.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 323
  • Call me Vic!
    • View Profile
    • PublicDomainWeekly.com
    • Read more about this member.
    • Donate to Member
Local server, 192.168.0.232.
But I only need the timer part, the call to ther server can be done with curl.

Got it! DonationTimer.exe it is with DonationTimer.wav as sound file :Thmbsup:

I'm @ it! https://github.com/p...domain/donationtimer

UPDATE: Code's finished :)
✔️ New releases: PublicDomainWeekly.com

🎁 One-time support: Paypal @ www.paypal.com/paypalme/victorvls

❤️ Steady support: Patreon @ www.patreon.com/publicdomain

Thanks & keep on rocking!
Email/Paypal: publicdomainvicgmail.com

Coding: GingerTG v0.1.0
--Victor
« Last Edit: April 03, 2021, 11:20 AM by publicdomain »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 323
  • Call me Vic!
    • View Profile
    • PublicDomainWeekly.com
    • Read more about this member.
    • Donate to Member
DonationTimer.exe it is with DonationTimer.wav as sound file
-publicdomain (April 02, 2021, 11:21 PM)

DonationTimer_v0-1-0.png

Download & info: https://www.dcmember...onationtimer-v0-1-0/

Forum thread: https://www.donation...ex.php?topic=51271.0

You can use any sound file you want by placing it in the same folder & renaming it to "DonationTimer.wav" :)

(If there's no sound file it beeps)

Enjoy!
Vic
✔️ New releases: PublicDomainWeekly.com

🎁 One-time support: Paypal @ www.paypal.com/paypalme/victorvls

❤️ Steady support: Patreon @ www.patreon.com/publicdomain

Thanks & keep on rocking!
Email/Paypal: publicdomainvicgmail.com

Coding: GingerTG v0.1.0
--Victor

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
@vic: your fliesystem looks crazy "C:\DonationTimer\donationtimer\DonationTimer\..." did not tested program, just only curious looked at image  :huh:

But I bet it works like you said, never had trouble with your Applications so far!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 323
  • Call me Vic!
    • View Profile
    • PublicDomainWeekly.com
    • Read more about this member.
    • Donate to Member
@vic: your fliesystem looks crazy "C:\DonationTimer\donationtimer\DonationTimer\..."

haha indeed!  :) There's a little "software story" there!

  • DonationTimer   Parent directory for the program
          INFO, IMG, Release
  • donationtimer   GitHub information
          Readme, LICENSE, .git
  • DonationTimer   Destination folder as chosen manually for the solution
  • DonationTimer   Target sub-folder created by the IDE automatically
          Program.cs, Solution file, resources, generated output
  • bin      Program binaries
          Debug, Release
  • Release      Compiled executable for distribution
  • DonationTimer.exe Public program

DonationTimer_v0-1-0_KZ.png

There you go, sharp friend!

(Image bonus: Why 7590, then 759? K = Decimal ASCII 75, Z = Decimal 90 --had to make this one for you here  :Thmbsup:)

Cheers & lots of love! :-*
Vic
✔️ New releases: PublicDomainWeekly.com

🎁 One-time support: Paypal @ www.paypal.com/paypalme/victorvls

❤️ Steady support: Patreon @ www.patreon.com/publicdomain

Thanks & keep on rocking!
Email/Paypal: publicdomainvicgmail.com

Coding: GingerTG v0.1.0
--Victor

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
(Image bonus: Why 7590, then 759? K = Decimal ASCII 75, Z = Decimal 90 --had to make this one for you here  :Thmbsup:)
-publicdomain (April 03, 2021, 07:32 PM)
Solution, do a "length(string) mod 2" check to choose a correct string to integer direction/translation :)
(if result is 0 you have something dividable by two, for example a string with length of 4 '7590', so you can add 2 chars from that string,
but i do not know how your program handle invalid integers like 75h 90m
(hours should just go to 23, minutes should just go to 59, everything higher should result in recalculation of wanted time amount),
have you got 90m -> [add to final time amount] + 1h 30m calculation integrated? ^_^

With my own little unfinished calendar thingy I do recalculate everything up to years, month, days, hours, minutes, seconds, milliseconds, nanoseconds [last two only internal]
my base is milliseconds, from there I do add everything to have final time)

If that matters at all,
keep it up!

Join us on Discord ;-)

user45454

  • Participant
  • Joined in 2010
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Local server, 192.168.0.232.
But I only need the timer part, the call to ther server can be done with curl.

Got it! DonationTimer.exe it is with DonationTimer.wav as sound file :Thmbsup:

I'm @ it! https://github.com/p...domain/donationtimer

UPDATE: Code's finished :)
-publicdomain (April 02, 2021, 11:21 PM)

Hi,
Many thanks for the program.
Im testing it now and this should be exactly what I need.

 :D :-* :up: