2010-04-03, 20:16
Hi all, I'm pretty new to xbmc scripts (I wrote a few around 5 years ago for the xbox, and have only recently revisitied).
However, I'm trying to get a nice looking menu come up so that I can add os commands to control my lights, doors etc... I already have scripts written that do this, and can control them from python easily.
The only problem I'm having is making nice looking menus:
This returns an error - not sure which, it just says "error". Even when I don't get an error, I only get a blank screen.
What am I missing with regards to making a context-menu like menu?
However, I'm trying to get a nice looking menu come up so that I can add os commands to control my lights, doors etc... I already have scripts written that do this, and can control them from python easily.
The only problem I'm having is making nice looking menus:
Code:
import commands
import os
import xbmc, xbmcgui
#get actioncodes from keymap.xml
ACTION_PREVIOUS_MENU = 10
LIST_LIST3 = 122
class MyClass(xbmcgui.Window):
def __init__(self):
name = "test1"
liz=xbmcgui.ListItem("name", iconImage="DefaultFolder.png",thumbnailImage=iconimage)
liz.setInfo( type="Video", infoLabels={ "Title": name })
ok=xbmcplugin.addDirectory(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
return ok
This returns an error - not sure which, it just says "error". Even when I don't get an error, I only get a blank screen.
What am I missing with regards to making a context-menu like menu?