יש לי את הקוד הזה
קוד: בחירת הכל
import xbmc
import xbmcgui
import time
def executeSomething():
#code here
xbmc.executebuiltin("RunScript(special://profile/check.py)")
time.sleep(5)
while True:
executeSomething()ויש את הקוד הזה
קוד: בחירת הכל
import xbmc
import xbmcgui
import time
def kodiidle():
ILT = 0
IDLE_TIME_MIN = 1
s = 0
while(1):
it = xbmc.getGlobalIdleTime()
s = ((IDLE_TIME_MIN * 60) - it )
if (s > 0):
if (ILT == 1):
if xbmc.Player().isPlayingVideo():
pass
else:
xbmc.executebuiltin("Notification(the light is ,1,2000,special://profile/icon_power_off.png)")
ILT = 0
elif (s < 0):
if (ILT == 0):
xbmc.executebuiltin("Notification(the light is ,2,2000,special://profile/icon_power_off.png)")
ILT = 1
while True:
kodiidle() עכשיו מה שאני רוצה זה לשלב בין שתי הקודים
כלומר אם לא נעשה שימוש בקודי דקה הקוד הראשון יפסיק לעבוד
וכאשר אני חוזר לשימוש בקודי הקוד הראשון יחזור לעבודה כל 5 שניות
שיחקתי קצת בקוד ולא ממש הצלחתי
יש כאן מספר חברים שעזרו לי בעבר בכמה דברים ואני מקווה שאתם תעזרו לי שוב
תודה והמשך ערב דבש
[/code]
