Kodi Community Forum

Full Version: "RandomAddon.%d.Path" not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to get Random Addons to launch when you click but no luck in getting it to work.

PHP Code:
        <!-- Apps -->    
        <
control type="group" id="3000">

            <!-- 
Random Apps -->                
            <
control type="group">
                <
visible>Container(300).HasFocus(9)</visible>                
                <
control type="wraplist" id="310">
                    <include>
Random Addons</include>
                    <
content>        
                        <
item id="1">
                            <
icon>$INFO[Window.Property(RandomAddon.1.Fanart)]</icon>
                            <
label>$INFO[Window.Property(RandomAddon.1.Name)]</label>
                            <
label2>$INFO[Window.Property(RandomAddon.1.Summary)]</label2>
                            <
onclick>$INFO[Window.Property(RandomAddon.1.Path)]</onclick>
                        </
item>
                        <
item id="2">
                            <
icon>$INFO[Window.Property(RandomAddon.2.Fanart)]</icon>
                            <
label>$INFO[Window.Property(RandomAddon.2.Name)]</label>
                            <
label2>$INFO[Window.Property(RandomAddon.2.Summary)]</label2>
                            <
onclick>$INFO[Window.Property(RandomAddon.2.Path)]</onclick>
                        </
item>
                        <
item id="3">
                            <
icon>$INFO[Window.Property(RandomAddon.3.Fanart)]</icon>
                            <
label>$INFO[Window.Property(RandomAddon.3.Name)]</label>
                            <
label2>$INFO[Window.Property(RandomAddon.3.Summary)]</label2>
                            <
onclick>$INFO[Window.Property(RandomAddon.3.Path)]</onclick>
                        </
item>
                        <
item id="4">
                            <
icon>$INFO[Window.Property(RandomAddon.4.Fanart)]</icon>
                            <
label>$INFO[Window.Property(RandomAddon.4.Name)]</label>
                            <
label2>$INFO[Window.Property(RandomAddon.4.Summary)]</label2>
                            <
onclick>$INFO[Window.Property(RandomAddon.4.Path)]</onclick>
                        </
item>
                        <
item id="5">
                            <
icon>$INFO[Window.Property(RandomAddon.5.Fanart)]</icon>
                            <
label>$INFO[Window.Property(RandomAddon.5.Name)]</label>
                            <
label2>$INFO[Window.Property(RandomAddon.5.Summary)]</label2>
                            <
onclick>$INFO[Window.Property(RandomAddon.5.Path)]</onclick>
                        </
item>                        
                    </
content>
                </
control>
                <include>
Arrows</include>
            </
control>
            <!-- 
Random Apps (End) --> 

The above is what I have, It displays the fanart,name,summary but when you click nothing happens.

"RandomMovie.%d.Path" & "RandomAlbum.%d.Path" all work with the same code as above (labels changed, etc.) but not addons.
nevermind fixed it.

used <onclick>RunAddon($INFO[Window.Property(RandomAddon.%d.Path)])</onclick> and it works now!
XBMC.RunAddon($INFO.....Path)