Solved Open favourite item
#1
Is it possible to open a particular favourite using activatewindow?

For example I have tried

Code:
<onclick>ActivateWindow(favourite.1.Path)</onclick>

to try and open the first favourite but without luck.
Reply
#2
Yes you will need to use the favourites script.
Image
Reply
#3
PHP Code:
INFO FOR SKINNERS How to use this addon in your skin:


1RunScript(script.favourites,property=CustomFavourite.1)

   If 
you run the script like thisit will open a select dialog with all existing favouritesAfter selecting one,
   
the script will set the following skin strings based on the provided property:

   
CustomFavourite.1.Label
   CustomFavourite.1
.Icon
   CustomFavourite.1
.Path

   Additionally you can pass 
'changetitle=true' to the scriptthis will allow the user to change the name of the label.

   
The first item in the list (nonecan be used to remove the current favourite from a button.
   
The last item in the list (no actioncan be used to change the label of a button without asigning an action to it.

2RunScript(script.favourites)

   If 
you run the script like thisit will set the following home window properties:
   
favourite.%d.path
   favourite
.%d.name
   favourite
.%d.thumb
   favourite
.count

   Additionally you can pass 
'playlists=play' to make sure xbmc will play the playlist instead of opening it

Here is the thread:
http://forum.xbmc.org/showthread.php?tid=114671
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#4
Thanks Black. I tried adding the script, which I believe is working using <onload>RunScript(script.favourites)</onload> in my home.xml file.

but when I try to open the first favourite using <onclick>ActivateWindow(favourite.1.path)</onclick> it still doesn't do anything...

got it to work with <onclick>$INFO[Window(Home).Property(favourite.1.path)]</onclick>...

thanks! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Open favourite item0