Kodi Community Forum

Full Version: Possible to start Script like MovieMazer from Submenu?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
iam trying to start the MovieMazer Script from the Submenue in the Homescreen.

I mean like having a Home Item called Scripts and from this submenue i want to directly start the script.

Here is a Pastebin Log

the code is this:

Code:
<control type="button" id="402">
                        <width>750</width>
                        <height>40</height>
                        <font>font12</font>
                        <label> - $LOCALIZE[31120]</label>
                        <label2>[color=selected]$INFO[Skin.String(HomeScriptButton1_label)][/color]</label2>
                        <textcolor>grey2</textcolor>
                        <focusedcolor>white</focusedcolor>
                        <texturefocus flipx="true">listwhitegradient.png</texturefocus>
                        <texturenofocus>menuitemNF.png</texturenofocus>
                        <onclick>Skin.SetString(HomeScriptButton1_label)</onclick>
                        <visible>Skin.HasSetting(HomeScriptButton1)</visible>
                    </control>

Code:
<control type="button" id="402">
                        <width>750</width>
                        <height>40</height>
                        <font>font12</font>
                        <label> - $LOCALIZE[31120]</label>
                        <label2>[color=selected]$INFO[Skin.String(HomeScriptButton1_label)][/color]</label2>
                        <textcolor>grey2</textcolor>
                        <focusedcolor>white</focusedcolor>
                        <texturefocus flipx="true">listwhitegradient.png</texturefocus>
                        <texturenofocus>menuitemNF.png</texturenofocus>
                        <onclick>Skin.SetString(HomeScriptButton1_label)</onclick>
                        <visible>Skin.HasSetting(HomeScriptButton1)</visible>
                    </control>
                    <control type="button" id="403">
                        <width>750</width>
                        <height>40</height>
                        <font>font12</font>
                        <label> - $LOCALIZE[31121]</label>
                        <label2>[color=selected]$INFO[Skin.String(HomeScriptButton1_Path)][/color]</label2>
                        <textcolor>grey2</textcolor>
                        <focusedcolor>white</focusedcolor>
                        <texturefocus flipx="true">listwhitegradient.png</texturefocus>
                        <texturenofocus>menuitemNF.png</texturenofocus>
                        <onclick>Skin.SetFile(HomeScriptButton1_Path,.py)</onclick>
                        <visible>Skin.HasSetting(HomeScriptButton1)</visible>
                    </control>

could someone give me a hand on this please?
Hi,

I have the same question regarding regarding plugins like apple movie trailers lite. In the previous version I used ActivateWindow(VideoLibrary,plugins://video/Apple Movie Trailers Lite/,return) to activate the plugin. But in Dharma it will not work as the every plugin and scripts are now under addons with a different directory structure.

Anyone?
Here's how I do it for Alaska Revisited -

PHP Code:
<onclick>Skin.SetAddon(ProgramButtonPathScript_1,xbmc.python.script)</onclick>
<
onclick>Skin.SetString(ProgramButtonPath_1,RunScript($INFO[Skin.String(ProgramButtonPathScript_1)]))</onclick

and to launch it -

PHP Code:
<onclick>$INFO[Skin.String(ProgramButtonPath_1)]</onclick
Thanks for the reply. This works from scripts. But doesn't work for plugins. I also tried using the XBMC.RunPlugin function without any luck.
For plugins use -

PHP Code:
<onclick>Skin.SetAddon(ProgramButtonPathScript_1,xbmc.python.pluginsource)</onclick>
<
onclick>Skin.SetString(ProgramButtonPath_1,ActivateWindow(programs,plugin://$INFO[Skin.String(ProgramButtonPathScript_1)]))</onclick> 
Thanks Hitcher! Made it work with slight modification for use with video plugin like Apple Movie trailer and YouTube. The modification I have used:

<onclick>Skin.SetString(ProgramButtonPath_1,ActivateWindow(VideoLibrary,plugin://$INFO[Skin.String(ProgramButtonPathScript_1)]))</onclick>

Without the above modification, I could browse the folders inside youtube and AMT, but could not run videos as I was browsing through programs instead of videolibrary.

Thanks again!
Sorry, I should have said you need to change that part depending on where you want to run the add-on.