Can any software do this?

Naldo

2[H]4U
Joined
Jul 7, 2001
Messages
3,739
Sometimes I end up falling asleep while im watching TV from my bed (using my Pc). Is there any way to make it so that i can set a Timer (say every 30 minutes) and after the time expires a message pops up on the screen asking me to press a button if I want to keep watching TV or if im asleep and dont press the button, let the computer shut itself down.

Is this possible?
 

Therac-25

n00b
Joined
Jul 28, 2004
Messages
16
Absolutely possible on a Linux/MythTV setup.

Off the top of my head, you could set up a cron job to start up a little X program (small script, running as root, written in */Tk) which says something like "Shutting system down in 5 minutes..." that would just countdown and shut the system down. Then set up something in your lircrc like

begin
button = whatever
prog = irexec
config = kill `cat /var/run/tk_shutdown_script.pid`
end

There are, of course, more complex solutions. Depends on how far you want to go with it.
 

Naldo

2[H]4U
Joined
Jul 7, 2001
Messages
3,739
I'd go for it if Linux wasnt so complicated/hard to use. Any windows based solution?

The programming it myself is a good Idea, but the only language I'm familiar with is ADA and I took a stab at it but I dont know what the command to shut down the computer is. Anyone know?
 

Therac-25

n00b
Joined
Jul 28, 2004
Messages
16
The command to shutdown in XP is "shutdown -s -t 00"

So just use system() (C/C++) or Shell (VB) to execute that command when you want to shut down.
 

bigstusexy

2[H]4U
Joined
Jan 28, 2002
Messages
3,194
Just off the top of my head if you can set your remote to execute batch fiels then you can create one todo this.

All that has to be done is be able to trigger the recording program to start recording from the commandline and then quit when done. after that the shutdown command will execute and shutdown the computer.
 
Top