2005-11-03, 22:56
Quote:import xbmc,xbmcgui
action_menu = 10 ##remote: menu
action_select_item = 7
class test(xbmcgui.window):
def (self):
self.addcontrol(xbmcgui.controlimage(0,0,720,480, "q:\\scripts\\image_background.png"))
def onaction(self,action):
if action == action_menu:
self.close()
if action == action_select_item:
print "here" # <- no problem printing
x = xbmcgui.getcurrentwindowid()
print str(x) # <- doesn't print that
mydisplay = test()
mydisplay.domodal()
del mydisplay
when i run the above code, i get a red bg screen. when i press 'a' i would expect two lines to be printed. instead, the log only shows 'here' as being printed. am i using the xbmcgui.getcurrentwindowid() function incorrectly?
thanks!