20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

Solved Q: Return value from edit Control via Control.GetLabel ??
#1
Hi, first the background,
i like to set Textlabel via an edit control which should be used as a content 'filter'

as example : filter artists

My issue is that i am unable to return the value from my edit control (id 100002).

Using Skin Strings set via button is fine, but how can i return the label of the editHuh
Video Example

I tried
with and without action

<onclick>Skin.Reset(SearchTermHUBArtist)</onclick>
<onclick>Skin.SetString(SearchTermHUBArtist,$INFO[Control.GetLabel(100002)])</onclick>


<control type="edit" id="100002">
                    <top>5</top>
                    <height>60</height>
                    <width>420</width>
                    <hinttext>Search me....</hinttext>
                    <description>My First edit control</description>
                    <texturefocus colordiffuse="white">buttons/NF_1zu5.png</texturefocus>    
                    <texturenofocus colordiffuse="44FFFFFF">buttons/button_6to1_Trans.png</texturenofocus>
                    
                    <font>MenucontrolItem</font>
                    <textoffsetx>20</textoffsetx>
                    <textoffsety>20</textoffsety>
                    <textcolor>grey</textcolor>
                    <focusedcolor>white</focusedcolor>
                    <disabledcolor>green</disabledcolor>
                    <invalidcolor>orange</invalidcolor>
                    <aligny>top</aligny>
                    <pulseonselect>no</pulseonselect>
                    <label></label>
                    <onclick>Skin.Reset(SearchTermHUBArtist)</onclick>
                    <onclick>Skin.SetString(SearchTermHUBArtist,$INFO[Control.GetLabel(100002)])</onclick>
                </control>

Content VAR
<variable name="HUB_artist_1">
        <value condition="!String.IsEmpty(Skin.String(SearchTermHUBArtist))">musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Skin.String(SearchTermHUBArtist)]%22%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D</value>
        <value condition="!String.IsEmpty(Contol.GetLabel(100002))">musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Control.GetLabel(100002)]%22%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D</value>
        <value>musicdb://artists/</value>
    </variable>
Skins                                                                                        
Reply
#2
have you tried Control.GetLabel(100002).index(1) ?
https://kodi.wiki/view/InfoLabels#Control
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2019-10-24, 10:38)ronie Wrote: have you tried Control.GetLabel(100002).index(1) ?
https://kodi.wiki/view/InfoLabels#Control
THANK YOU SO MUCH.

Works Perfect!!!!
Didnt recogniced that in wiki !!!
Skins                                                                                        
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Q: Return value from edit Control via Control.GetLabel ??00