2006-08-12, 10:52
I just wanted to know if it was possible to add a script that automaticaly runs when I logon to my profile and when it leave the xbox alone for 10 minutes that it goes back to the login screen. Is this possible at all?
# idle time in minutes
IDLE_TIME_MIN = 10
s = 1
while s > 0:
# get idle time
it = xbmc.getGlobalIdleTime()
#calculate sleep time in msec
s = ((IDLE_TIME_MIN * 60) - it ) * 1000
# sleep
if (s > 0): xbmc.sleep(s)
# log off
xbmc.executebuiltin('System.LogOff')