Posts: 121
Joined: Mar 2016
Reputation:
0
agb2
Senior Member
Posts: 121
Are there restrictions on where you can invoke Runscript, and if so where are they documented?
I'm trying to invoke a script at various points in the MyVideoNav window without success.
Before going into detail I'd like to know whether it's even possible :-}
The skin I'm using is Xonfluence, but I'm not sure that's relevant yet.
TIA for any pointers.
Posts: 15,263
Joined: Jan 2009
Reputation:
727
ronie
Team-Kodi Member
Posts: 15,263
i don't think there are any technical limitations, no.
Posts: 121
Joined: Mar 2016
Reputation:
0
agb2
Senior Member
Posts: 121
Thanks for replying.
I say 'not working' because the Python method I'm trying to invoke writes to the Kodi log, and I see nothing there.
If I call a method with deliberately incorrect parameters, I get this in the log
16:33:29 25342.855469 T:1958490112 ERROR: Misplaced [
16:33:29 25342.855469 T:1958490112 ERROR: Error parsing boolean expression RunScript(script.videoextras,check,"$INFO[ListItem.FilenameAndPath]")
so at least I know Kodi is trying to call it. [There is no ListItem at this point].
This is not the method I want to call, I just tried it instead of my own because I know it works :-}
Stumped.
Posts: 121
Joined: Mar 2016
Reputation:
0
agb2
Senior Member
Posts: 121
Hmmm. The call syntax I used works OK in an <onload> tag for a window [where the ListItem was previously defined].
I can't get it to work anywhere else [regardless of syntax, mine or yours as above] :-{
I've tried as a condition in <visible>, as the value in <onfocus>.
What I'm trying to do is to get hold of the ListItem displayed in the various views in MyVideoNav, so I can set some additional info.
Any ideas ? TIA.
Posts: 15,263
Joined: Jan 2009
Reputation:
727
ronie
Team-Kodi Member
Posts: 15,263
well, RunScript() is an action, not a boolean, so you can't use it in a <visible> condition.
one option would be to run your script from the context menu, by making it available as a context menu addon.