2007-05-21, 19:33
Hi All,
I'm a complete XBMC script newbie, but have been scripting in a lot of other applications before (mostly mIRC)
Anyway, the problem is, I want to make a shutdown timer script, that can put XBMC to sleep after a certain amount of time.
Looking through the documentation, it would seem like using XBMC.AlarmClock with XBMC.ShutDown() as a parameter would solve this nicely, but I can't seem to get anything from XBMC to work at all.
I have tried copying some code from other scripts, and they run fine, so its not my XBMC install thats not working. (Which, btw, is the T3CH distribution from 2007-05-14)
A very simple test i've tried getting to run, and which simply will not
Can anyone explain why this doesnt work?
To get to do what I want (shutting down), i'm guessing the code should look something like this
Which, according to the docs, should prompt for the time in minutes before running the command.
A small addendum, if i just use xbmc.ShutDown() the XBox shuts down fine, when the script is run.
I'm a complete XBMC script newbie, but have been scripting in a lot of other applications before (mostly mIRC)
Anyway, the problem is, I want to make a shutdown timer script, that can put XBMC to sleep after a certain amount of time.
Looking through the documentation, it would seem like using XBMC.AlarmClock with XBMC.ShutDown() as a parameter would solve this nicely, but I can't seem to get anything from XBMC to work at all.
I have tried copying some code from other scripts, and they run fine, so its not my XBMC install thats not working. (Which, btw, is the T3CH distribution from 2007-05-14)
A very simple test i've tried getting to run, and which simply will not
Code:
import xbmc
def Main():
xbmc.Notification('Test','Test')
Main()
Can anyone explain why this doesnt work?
To get to do what I want (shutting down), i'm guessing the code should look something like this
Code:
import xbmc
def Main():
xbmc.AlarmClock('shutdowntimer',xbmc.ShutDown())
Main()
Which, according to the docs, should prompt for the time in minutes before running the command.
A small addendum, if i just use xbmc.ShutDown() the XBox shuts down fine, when the script is run.