Set computer to go to sleep with timer

Here you are welcome to share your Push2Run cards

PLEASE NOTE:
If you are downloading a Push2Run card from here or anywhere else, please inspect it carefully before running it or any software associated with it. If you don't do this you may end up with seriously unwanted results.

When sharing a card, please leave any special instructions that are required for its use. For example, if additional software is needed to enable the card, you should leave a link to the program's official webpage.
Post Reply
SimplyAName
Posts: 4
Joined: Mon Dec 03, 2018 7:55 pm

Set computer to go to sleep with timer

Post by SimplyAName »

The first thing you will need when using this card is NirCmd. This some simple free software that allows for a load more commands that we want.

The download link at the bottom of the page. This page also contains a list of command if you ever want to do anything more with it.
http://nircmd.nirsoft.net/

Once downloaded unzip/extract the files to wherever you want. Preferable somewhere you can access easily enough. On my machine, I just made a folder and named it 'Push2RunStuff'.

Sleep without timer:
This card works by calling the nircmd.exe file and running the standby command to put the computer to sleep/standby. You will have to edit the card to point to the right directory but other than that should just work.
Put computer to sleep.p2r
Put computer to sleep instantly
(510 Bytes) Downloaded 1264 times

Sleep with a timer
This card will put your computer into a standby mode after a set amount of minutes defined by you eg: "Hey Google tell my computer to go to sleep after 20"

This card requires a little set up in you have to make a .bat file to run the command as you need to convert the number of minutes you give it into milliseconds for the 'cmdwait' command to use. To do this create a text file and paste the code below into the same folder as the 'nircmd.exe' file and rename the text file to 'sleepMinutes.bat' so it saves as a bat file that can be run.

set /a Milli= %1 * 60000
nircmd cmdwait %Milli% standby

After this should just be pointing the card to the correct directory to wherever you saved it same as previously and should all work.
Put computer to sleep - timer.p2r
Put computer to sleep with a timer
(605 Bytes) Downloaded 565 times

Hope you all enjoy and any problems or think I missed a step leave a comment and I'll do what I can :D
Last edited by SimplyAName on Wed Dec 05, 2018 7:46 am, edited 1 time in total.
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Set computer to go to sleep with timer

Post by RobLatour »

Thanks for posting this!
Post Reply