JayJay Posted June 25, 2006 Posted June 25, 2006 I'm new here. Haven't done a lot of programming for a long time, but I'm trying to "get the hang of it" again.I made a script to shutdown the computer at a specified time.Although the script works on this computer (the one I'm typing on now), it does not work on the computer it is intended for. On that computer, the screen goes black, the mousepointer stays visible and that is it. No logout, no shutdown, nothing. No keyboeard response either, I have to push the reset-button to get it working again.There is a program available on the forum to shutdown a computer, which does work on my other computer.So instead of Shutdown(5) (force shutdown) that I used, I changed it to Shutdown(9) (shutdown/powerdown) that the other program is using, but it still does not work on that computer.Any ideas why it isn't working on the Athlon 2400+?
Thatsgreat2345 Posted June 25, 2006 Posted June 25, 2006 im guessing the computer works with regular shutting down? because sometimes i just shutdown my comp and go to bed the screen goes black but the mouse is visible and can be, never figured out what it was.
JayJay Posted June 25, 2006 Author Posted June 25, 2006 I've made some very easy scripts to shutdown a computer, but IMHO the behavor of the old computer is weird.This works on both computers:; Test Script 1Shutdown(5)This works only on one of them:; Test Script 2While 1 If @HOUR=22 AND @MIN=0 Then Shutdown(5)WEndIn order to get it to work on the other computer as well, I had to rewrite it to:; Test Script 3While 1 If @HOUR=22 AND @MIN=0 Then ExitLoopWEndShutdown(5)(I also tried it with a Sleep(xx) in the loop but that didn't work either)After that I have re-written the original script to exit the main-loop before the Shutdown().It now works on both my computers.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now