2014-06-04, 08:23
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:
(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
because that way I would only need one button instead of one, but that will not work either.
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">
<left>756</left>
<top>600</top>
<label>$LOCALIZE[186]</label>
<onup>301</onup>
<onleft>308</onleft>
<onright>-</onright>
<ondown>401</ondown>
<onclick>RunScript(script.skinshortcuts,type=buildxml&mode=single&mainmenuID=9110)</onclick>
<onclick>Close</onclick>
<include>dialog_WindowButton</include>
<visible>StringCompare(Control.GetLabel(500),$ADDON[script.skinshortcuts 32071])</visible>
</control>
(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.