View Full Version : turn pc off at certain time?

November 14th, 2006, 12:19 AM
I know a little bit about girder and have built certain groups, but one thing I haven't figured out, if at all possible with girder, is how can I put my computer into hibernate if there is no activity after lets say an hour if the current time is after 12:00 a.m.

I know I can put my computer into a state after a certain amout of no activity, but what about if it's after 12:00 a.m. or so.

don't know if I should try to write a program to do this with my little knowledge of programming or if I can do this with girder? I would need a timer event I know that much.

I use girder to turn my tv off, so what I want to do with my media center is when I turn off my tv and after about an hour of no activity I want my computer to go into hibernate or standby if the current time is after 12:00 a.m.

probably easier than I think but I can't find a program to do this that works with girder.

November 14th, 2006, 12:48 AM

maybe this is an easier question to understand.
Can I catch a mouse event or keyboard event, if so can I perform a girder event if a mouse or keyboard events happens?

See I can set a timer, since I use girder with X10 to turn my tv off, to start and when ever a mouse or keyboard event happens I can reset the timer. the timer would check if the time is before or after 12:00 a.m. if no mouse or keyboard happens within an hour(the timer) then I can check if the time is before or after 12:00 a.m. then I can do what I need to do.

I don't really know how to explain this but it's the best I can do.
I don't know Lua script either but I'll learn it just for this.

Rob H
November 14th, 2006, 04:32 AM
You could do this using Lua I think using the gir.AddEventHandler() function to watch for any keyboard events. Not sure about the mouse though.

However, a possibly better method of doing this is to set your machine to enable the screensaver and have it hibernate after an hour. Then you could use the win.IAmBusyOn() and win.IAmBusyOff() functions (see the help under Lua library reference\win library\Screen Saver functions) to block or allow the screen saver at the appropriate times of day