What I should probably explain is that these scripts were built in mind to suit me alone
so I modded the skin to suit
my needs!
k_zeon Wrote:out of curiosity, where do you put the skin xml files.
Also do you just add each xml file and that gets automatically added to the current skin.
The skin files were put inside the 720p folder in my skin folder (I useCirrus Extended v2).
The script does not automatically add these files - and it can't because if someone uses a different skin it wouldn't work.
I made the xml files purely to fit my version of Cirrus.
tria Wrote:el Paraguayo, how did you become so great?
Thank you so much for sharing it.
But I have some questions
1. Do I need to include the xml files in a given file (like includes.xml or home.xml)
2. How to know the container and the control IDs (to check for visibility) especially when I have a different skin, or different arrangment
3. Do your script run at start up automatically, or you have to run it first to make the overlays show the data
4. Finally, imagine I called the update function (the one you scrap data with) using a timer function (the one you suggested). Will every call update the overlays without any problem?
btw, it is a sin not to release this addon. It should be in the official repository.
Easy on the praise tria! I knew nothing about skinning or writing scripts when I started with xbmc. Everything I learnt, I learnt from asking questions on the forum (it's a very helpful community) or looking at how other people's scripts work.
My scripts are messy. I'm not a coder, so there are bound to be mistakes, unhandled errors etc. The really impressive scripts are those that work for everyone straight away.
Anyway, more information on how to display those widgets.
I put the widget itself in a separate include file as it's just neater and easier for me to make changes.
Once I've made the file you need to make sure the skin is aware of it.
In Includes.xml I added these lines:
PHP Code:
<include file="IncludesTubeStatus.xml" />
<include file="IncludesTrainTimes.xml" />
Then, I get the homescreen to include the widgets:
Home.xml:
PHP Code:
<include>tubestatus</include>
<include>traintimes</include>
Lastly I add the items to my main menu:
PHP Code:
<control type="wraplist" id="9000">
...
<item id="41">
<label>Tube Status</label>
<onclick>RunScript(script.tubestatus)</onclick>
<icon>tubestatus/tube.jpg</icon>
</item>
<item id="42">
<label>Train Times</label>
<onclick>RunScript(script.traintimes, skin=True)</onclick>
<icon>traintimes/trainstation.jpg</icon>
</item>
Now, you remember that the widgets had this line:
PHP Code:
<visible>Container(9000).HasFocus(41) + Skin.HasSetting(tubestatus.IsFetched)</visible>
You should see that the container(9000) is the id of the main menu (above) and the HasFocus(41) is the id of my Tube Status within the menu. So that condition is only true when that menu item is showing.
The second condition "Skin.HasSetting(tubestatus.IsFetched)" is set by the script if it successfully updates.
I don't run the scripts at start up - you'll notice they're triggered by on <onclick> command on the menu item.
If you do the timer function then yes, the skin will update automatically (I use that on my football scores one)
Hope that's enough to get you going but keep asking questions if not.
As for getting these in the official repo - the scripts are likely to be too buggy and too specific for wide use.