Kodi Community Forum

Full Version: System.idle() in fcousedlayout with ActivateWindow
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

i had a problem with the system.idle() and activatewindow, i want to open a custom window after "x seconds", i tried this :

a panel, with a hidden button :

PHP Code:
<control type="button" id="4554">
onfocus condition="System.IdleTime(4)">ActivateWindow(1187)</onfocus>   

the problem is the Condition dont works, it comes not the customwindow..... when i delete the condition it works but i need the time....

is there another way to open a window with time ?
or why it dont works ?

Buttons inside item/focusedlayout are not supported officially (you will get errors in log file) so we strongly recommend to not use that technique in general.
If you're using a custom window you could have a <visible> tag look at System.IdleTime bool. It's similar to how I show a Now Playing window in Immersive. Not sure if it will grab focus though, if that's what you're after.

Have a look here: https://github.com/Sranshaft/skin.immers...laying.xml