2016-12-04, 22:40
(2016-12-04, 16:38)wyrm Wrote: sorry have been unwell and so have only just had a look at one of your previous posts. Previously I had asked how I could just assign the filename part of a file path to a skin string. After your suggestion to use -1 as a index to get to the filename part of the string I have tried the following to get what I am after.
PHP Code:<onclick>RunScript(script.skin.helper.service,action=stripstring,splitchar=/,string=$VAR[CustomPlaylistPlay],output=$INFO[Window(settings).Property(FileNameAndExt)],index=-1)</onclick>
<onclick>RunScript(script.skin.helper.service,action=stripstring,splitchar=.,string=$INFO[Window(settings).Property(FileNameAndExt)],output=$INFO[Window(settings).Property(FileName)],index=1)</onclick>
unfortunately I don't seem to have anything written to the property string. So what have I messed up?
Your problem is the output parameter. You can only give the key there and the window will always be the Home window...
So in this case:
RunScript(script.skin.helper.service,action=stripstring,splitchar=/,string=$VAR[CustomPlaylistPlay],output=filenameandext,index=-1)
The output will be stored in:
$INFO[Window(Home).Property(filenameandext)]