Im new to the whole scripting thing so this may be very easy. How would I write a script that would at a set time by the user through a window put the computer to sleep. I have figured out how to put it to sleep when I run the script, but not at a set time.
Try putting something like this before your sleep command:
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]
edit: What do you use to put the computer to sleep? How about restart?