How to put your computer in sleep-mode with a program

Forums General Guides How to put your computer in sleep-mode with a program

Viewing 0 reply threads
  • Author
    Posts
    • #44681
      hackerman1
      Moderator

        How to put your computer in sleep-mode with a program

        I´ve seen many requests for this, and a few solutions, but they need to be “run as admin” which means you have to enter a password each time.

        This program works with a normal USER-account !
        You do not need to “run as admin”, and it does not need any password.
        This means that you can fx. have a batch-file do some work, and with this program as last command the computer goes to sleep after finishing the work.

        KEYSTACK /W18 CTRL-ESC /W18 RIGHT /W18 RIGHT /W18 S
        EXIT

        save it as fx. “Sleep.btm”
        create a shortcut (icon) on your desktop

        If you fx. add 2 lines it can also automatically reconnect to internet when it “wakes up”.

        KEYSTACK /W18 CTRL-ESC /W18 RIGHT /W18 RIGHT /W18 S
        BEEP 0 900
        RASPHONE -D "3"
        EXIT

        A short decription of the program

        “Keystack” puts keystrokes in a buffer, and then executes them
        /W18 is a delay, in this case 18 “ticks” = 1 second.
        If it doesn´t work properly adjust the delay, you might need more delay between keystrokes, try 36 or more.
        BEEP 0 900 is a delay, the first digit is frequency in Hz (0=none), followed by delay, 900 is “ticks” = 50 seconds, to let the computer “wake up” properly before dialing out.
        You can try other delays, but on my computer 900 (or more) is needed.
        RASPHONE is a dial-up command, i´m using a dial-up connection so the command is “Rasphone -D”,
        followed by the name of the connection, “3”.
        Replace the command if you use some other type of connection.
        EXIT closes the window

        And, since this is a BTM-file and not a BAT-file, you will need TCC/LE, the FREE version of Take Command, available here: http://jpsoft.com/all-downloads/downloads.html

    Viewing 0 reply threads
    • You must be logged in to reply to this topic.