Kodi timed event?
#1
I have a window built with a python script, using "xbmcgui.Window"

Inside this window I add an ControlTextBox, add some lines, to the doModal() stuff... All good!

Latter on I add onAction(sefl,action) function such that at a key press the ControlTextBox will scroll. Still good!

My problem is that I can't make the scroll key-press independent. I want the text to scroll at some set intervals (no, autoscroll will not cut the deal for me).
Such events have to be tied to an action (key-press)?
Reply
#2
This is what I use to perform periodic tasks inside Kodi: https://github.com/romanvm/kodi.yatp/blo...ers.py#L17

You also need to periodically check xbmc.abortRequested flag and abort your timer on Kodi exit.
Reply
#3
Could be usefull, but I can't figure out how to trigger an action when time expires.

http://pastebin.com/wfgW6f5k .That code lives inside the Python class that builds the window.

If I do:

http://pastebin.com/aQ8MeazP

.. the scroll won't start


p.s. sorry about pastebin, I get blocked when trying to paste code blocks directly
Reply
#4
(2016-07-07, 10:03)mirceaciu Wrote: Could be usefull, but I can't figure out how to trigger an action when time expires.

You cannot because actions are triggered by the Kodi core. However, you can put your scrolling code into a separate function and call this function either from a Window callback or from a timer that I've suggested you.
Reply
#5
(2016-07-07, 14:14)Roman_V_M Wrote:
(2016-07-07, 10:03)mirceaciu Wrote: Could be usefull, but I can't figure out how to trigger an action when time expires.

You cannot because actions are triggered by the Kodi core. However, you can put your scrolling code into a separate function and call this function either from a Window callback or from a timer that I've suggested you.

Yes, that did the trick, thank you!
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi timed event?0