Hi All.
pls help me, i need to run python script after my skinned window loading event, defined as home.xml of the my skin.
How can i do it, i tryed to place next code into my window definition:
<window id="0">
<defaultcontrol always="true">300</defaultcontrol>
<allowoverlay>no</allowoverlay>
<oninit>XBMC.RunScript(U:\skin\My_Skin\Extras\Authentification\default.py)</oninit>
but i dont see anything.
thx
ps: i've not found the oninit or onload tag in the window xml structure (http://wiki.xbmc.org/?title=Window_Structure), but i think that is possible, am'i right?
WindowXML & Init event
DuШes
Junior Member Posts: 22 Joined: Feb 2009 Reputation: 0 |
2009-03-29 02:05
Post: #1
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2009-03-29 02:56
Post: #2
If you are using windowxml, then use the python oninit callback to do processing.
See the python documentation (see Nuka1195's sig for instance) Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Nuka1195
Skilled Python Coder Posts: 3,917 Joined: Dec 2004 Reputation: 17 |
2009-03-29 06:34
Post: #3
here
|
| find quote |
jpoveda
Junior Member Posts: 20 Joined: Nov 2008 Reputation: 0 |
2009-03-29 07:22
Post: #4
Thanks a lot.
|
| find quote |
DuШes
Junior Member Posts: 22 Joined: Feb 2009 Reputation: 0 |
2009-03-29 09:13
Post: #5
Nuka1195 Wrote:here jmarshall Wrote:If you are using windowxml, then use the python oninit callback to do processing. sorry, but i don't want to run script , i need to run script from my our skin (more, i want to do it declaratively in the window XML definition), and i cannot find anything like init or init callback in the http://wiki.xbmc.org/?title=Window_Structure and http://xbmc.sourceforge.net/python-docs/xbmcgui.html documentation... may be, are the docs in these links not actual for present? becouse i see and onInit and onFocus callbacks in here: http://forum.xbmc.org/showthread.php?tid=24839 but cannot find it in the links above showed/// ps: sorry my dreadfull english pps: thxs a lot for your answers |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2009-03-29 10:06
Post: #6
Easiest way in that case is to make a default control have an <onfocus> event (which runs the script, then sets focus elsewhere).
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
DuШes
Junior Member Posts: 22 Joined: Feb 2009 Reputation: 0 |
2009-03-29 10:31
Post: #7
jmarshall Wrote:Easiest way in that case is to make a default control have an <onfocus> event (which runs the script, then sets focus elsewhere). thx i 've done it as it is done in the startup xml window : <window> <defaultcontrol always="true">10</defaultcontrol> <allowoverlay>no</allowoverlay> <controls> <control type="button" id="10"> <description>Trigger</description> <onfocus>ReplaceWindow(LoginScreen)</onfocus> <texturenofocus>-</texturenofocus> <texturefocus>-</texturefocus> </control> </controls> </window> |
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
Search
Help