Menu

does it accept some command line parameters?

Lidit
2017-10-20
2017-11-28
  • Lidit

    Lidit - 2017-10-20

    If so, how would you launch it automatically with a count down timer of 1h?

    Thanks!

     
  • Chris Shields

    Chris Shields - 2017-10-20

    It does, but not for starting the countdown unfortunately. I'll add a function to start the timer when I get a chance The program is designed to be ran in the background really - clicking the icon and then clicking "Countdown Timer" restarts the last countdown duration. Would the command line function need to work even if Sleep# was already running?

     
  • Lidit

    Lidit - 2017-10-20

    Thanks for your reply Chris,

    Would the command line function need to work even if Sleep# was already running?

    I don't know, I only need to run a script that will launch a sound (whitenoise) and then Sleep# with the arguments "sleep in 1h" + "5mn fade".

    I guess the easiest for you will be the best (I can kill Sleep# before, or launching it before running the commande line parameters).

     

    Last edit: Lidit 2017-10-20
  • Chris Shields

    Chris Shields - 2017-10-25

    Hi Lidit,

    I've made a basic implementation which responds to the -countdown command line parameter. It simply sets the countdown to its last set value (like clicking the "Countdown Timer" menu item) and starts the timer. Is this suitable?

    You can also communicate with Sleep# using the custom Unified Remote interface (https://www.unifiedremote.com/) - this sends messages to the hwnd which Sleep# stores in %temp%\sshw upon startup. See the win.send commands in C:\ProgramData\Unified Remote\Remotes\Custom\Sleep#\remote.lua.

    Let me know if this is ok or if you have any problems. I haven't properly tested it but I tried to make as few changes as possible. An updated version to fix the fader issue with some Windows 10 Apps will include this change.

    Thanks for using Sleep#!

    Chris

     
  • Chris Shields

    Chris Shields - 2017-10-26

    v3.21.1 Sent the command line option -countdown to the previous instance if Sleep# is already running.

     
  • Lidit

    Lidit - 2017-11-21

    I apologize for the delay of response (for some reason I did not get the alert). Yes I can now run through a cmd shortcut which is awesome.

    ps: I just noticed it's not open source (I thought sourceforge was only about open source), so I can't install it on my main computer. You should maybe consider providing the source, your app would be much more popular if it was on github. Anyway, thanks a lot!

     
  • Chris Shields

    Chris Shields - 2017-11-28

    Hi Lidit,

    I've just released v3.22 which has a major overhall of the log window. Bug fixes and your changes are now included.

    I'll work towards commenting the code and making it open source - out of interest, why can't you install closed source software on your main computer?

    Thanks for your help and recommendations.

    CHris

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.