2017-11-14, 21:36
(2016-01-26, 22:41)marcelveldt Wrote:Hi Marcel,(2016-01-23, 10:30)emiralles Wrote: Hi, can you add a function for check if a file exist or not? There isn't any that do it.
How do you want this implemented ?
call the script with something like script.skin.helper.service,action=fileexists,file=blahlah.file and return the result in a window prop or skin string ?
Or just add it as a general window property for the selected listitem ?
Relatively new to skinning and xml, and have been teaching myself and this is the first time I have reached out to forums to figure something out.
I want to implement your fileexists in my skin from your script.skin.helper.service and have read everything I could find on the subject (which certainly helped) but I still can't figure it out.
I tried
Quote:<onload>RunScript(script.skin.helper.service,action=fileexists&file=C:\Users\Blues\Desktop\Textures.xbt&skinstring=Textures)</onload>and
Quote:<onload>RunScript(script.skin.helper.service,action=fileexists&file=[C:\Users\Blues\Desktop\Textures.xbt]&skinstring=Textures)</onload>and even
Quote:<onload>RunScript(script.skin.helper.service,action=fileexists&file="C:\Users\Blues\Desktop\Textures.xbt"&skinstring=Textures)</onload>This is the error in the log from the last attempt
Quote:13:26:26.039 T:30784 NOTICE: Skin Helper Service --> Skin Helper Service version 1.1.3 startedI hope it is just a silly mistake I am making and I understand if you are too busy to assist, but any insight you are willing to give would be greatly appreciated. Is it that I can't check for a file anywhere I want and it is just confined to the Kodi data folder? I hope not, because I need to be able to check for files outside of Kodi. I also want to be able to check for files and folders in Android as well but I am testing it on PC first.
13:26:26.504 T:29772 WARNING: Skin Helper Service --> Traceback (most recent call last):
File "C:\Users\Blues\Desktop\#Kodi Installs\Kodi 17 Test1\portable_data\addons\script.skin.helper.service\resources\lib\main_module.py", line 41, in __init__
getattr(self, action)()
AttributeError: MainModule instance has no attribute 'fileexists&file="c:\users\blues\desktop\textures.xbt"&skinstring=texture'
13:26:26.504 T:29772 ERROR: Skin Helper Service --> Exception in resources.lib.main_module ! --> No such action: fileexists&file="c:\users\blues\desktop\textures.xbt"&skinstring=texture
Thanks in advance for any help you are able to render. This script looks like it will be extremely helpful if I can figure this out. Thank you for all your hard work in the community.