Does XBMC. functions work?
#1
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

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.
Reply
#2
http://www.xboxmediacenter.com/wiki/inde...ltin&go=Go

indicates that you should use:

xbmc.executebuilting("xbmc.alarmclock(etc. etc.)")

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Ahh, hmm, i'm pretty sure I tried something like that, but i'll give it a go later on.

Anyway, I also discovered that if you press down/up when you are on the shutdown icon, you can to a timed shutdown, which is exactly what I want, so I don't actually need to script it myself Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Does XBMC. functions work?0