2011-01-08, 16:31
i want to call code block that is inside my current running plugin from selecting an item in a context menu.... is this possible to do without restarting the plugin?
ie. if i have in my default.py:
i would like to run DoSomeLolThings('rofl','lmao') when i click the entry in the list item.
the code below is what i'm currently using to add list item.
thanks,
A
ie. if i have in my default.py:
PHP Code:
def DoSomeLolThings(blah1,blah2):
print blah1,blah2
i would like to run DoSomeLolThings('rofl','lmao') when i click the entry in the list item.
the code below is what i'm currently using to add list item.
PHP Code:
commands=GetContextItem('Add to Icefilms Favourites',icepath+'+/default.py',"")
liz.addContextMenuItems( commands, replaceItems=True )
def GetContextItem(name,script,arg):
commands = []
runner = "XBMC.RunPlugin(" + str(script) + str(arg) + ")"
commands.append(( str(name), runner, ))
return commands
thanks,
A