$ADDON[] stringcompare - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: $ADDON[] stringcompare (/showthread.php?tid=196979) |
$ADDON[] stringcompare - Jeroen - 2014-06-04 Should it be possible to use a stringcompare on $ADDON[] labels? I'm trying to enable / disable buttons based on the value of a label provided by an add-on: PHP Code: <control type="button" id="10"> (Label ID 500 can be either $LOCALIZE[31071] or $LOCALIZE[31072]) But this doesn't work. However when I use the non-localized string 32071 refers to, the condition does work. I also tried to use PHP Code: <onclick condition="StringCompare(Control.GetLabel(500),$ADDON[script.skinshortcuts 32071])">RunScript(script.skinshortcuts,type=buildxml&mode=single&mainmenuID=9110)</onclick> because that way I would only need one button instead of one, but that will not work either. RE: $ADDON[] stringcompare - removed151214 - 2014-06-04 Not sure about comparing to an $ADDON string - and hopefully someone else will come along who can answer that - but in this particular situation you can use (and I would suspect actually are for button 405 ) the following: Code: StringCompare(Window.Property("groupname"),mainmenu) RE: $ADDON[] stringcompare - Jeroen - 2014-06-04 sigh...sometimes the solution is just right under the nose isn't it... Thanks man Out of curiosity and possible future reference, I'm still interested in the answer though |