Posts: 283
Joined: Feb 2014
Reputation:
3
hello, im looking for a way to run a script on a scripts first run or at installation, also on every update would be nice.
thanks for any tips
Posts: 3,447
Joined: Jan 2011
Reputation:
362
pkscout
Team-Kodi Member
Posts: 3,447
One thing you could try is to have a hidden skin setting with the version number. Then use a conditional to check that setting against a string. If it doesn't match (and empty would count as not matching) then run the script and save the updated version number to the setting. I do something similar for my Estuary mod, although I only load some variables, not run a script. The only thing you have to remember to do is bump the version string in the skin where you do the conditional.