I have been trying to teach myself some skinning for Kodi. I have used an existing module script-xxx.xml -- I have learned a ton by tweaking here and there, and am at a point where I am trying to make my own skin. Here is my question. I have a label control with the following syntax:
<label>$INFO[Control.GetLabel(3998)]</label>
The value within the Control.GetLabel(3999) is the value that I want to use... however, I only want to use the first value from that variable. the variable contains a number followed by a space and them some other text. I am looking for a way to extract only the number part. Example: "23 pants ordered", I would want the value of only "23" (ultimately I would love to format it as "0023") -- Example: "750 items ordered" , I would want to extract the value "750" (ultimately would love to format it as "0750"). I think that this may need to use some sort of Split command and extract only the first value, but I have no idea how that syntax works. I've been trying and searching web for 2 days now. I know this is an easy one for you more advanced skinners. Please help out a newbie...
Thanx in advance.
<label>$INFO[Control.GetLabel(3998)]</label>
The value within the Control.GetLabel(3999) is the value that I want to use... however, I only want to use the first value from that variable. the variable contains a number followed by a space and them some other text. I am looking for a way to extract only the number part. Example: "23 pants ordered", I would want the value of only "23" (ultimately I would love to format it as "0023") -- Example: "750 items ordered" , I would want to extract the value "750" (ultimately would love to format it as "0750"). I think that this may need to use some sort of Split command and extract only the first value, but I have no idea how that syntax works. I've been trying and searching web for 2 days now. I know this is an easy one for you more advanced skinners. Please help out a newbie...
Thanx in advance.