PDA

View Full Version : The built-in AlarmClock-function... is it still there?


junk
2009-06-18, 00:21
I'm trying to use the built-in AlarmClock-function found at http://www.xbmc.org/wiki/?title=List_of_Built_In_Functions.

I do like this:

import xbmc, xbmcgui

class MyWindow(xbmcgui.Window):
def __init__(self):
self.heartbeat()

def heartbeat(self):
xbmc.AlarmClock("aname",self.heartbeat,"10")

But get the following error:

23:18:40 T:980 M:893874176 NOTICE: xbmc.AlarmClock("aname",heartbeat,"10")
23:18:40 T:980 M:893874176 NOTICE: AttributeError
23:18:40 T:980 M:893874176 NOTICE: :
23:18:40 T:980 M:893874176 NOTICE: 'module' object has no attribute 'AlarmClock'

What am I doing wrong?

Thanks in advance!

spiff
2009-06-18, 11:28
xbmc.alarmclock is a builtin command and as such

xbmc.executebuiltin('alarmclock(<name>,<builtincommandtorun>,<time>))')

junk
2009-06-18, 14:46
Oh. Maybe it should be stated at http://www.xbmc.org/wiki/?title=List_of_Built_In_Functions how to run a built in command from python.

Thanks for the help!