2011-04-20, 11:32
I'm writing a script that will suspend XBMC and set an ACPI wakeup alarm based on the next scheduled MythTV recording.
The script currently uses a pop-up to ask the user if they want the system to shutdown.
However, there may be scenarios where it's appropriate to shutdown but the user is not there. So I'd like to be able to shutdown if the user doesn't respon in, say, 10 seconds.
Is that possible?
The code for the box is:
The script currently uses a pop-up to ask the user if they want the system to shutdown.
However, there may be scenarios where it's appropriate to shutdown but the user is not there. So I'd like to be able to shutdown if the user doesn't respon in, say, 10 seconds.
Is that possible?
The code for the box is:
Code:
def showDialog(title, body):
dialog = xbmcgui.Dialog()
if dialog.yesno(title, body):
doSuspend()