I'm terrible at python and need your help with two questions
#5
doModal() is suppose to loop until you call self.close(), as far as I understand it, doModal loops and redraws on its own,
Im not sure why it isn't for you. I tested what I gave you and it worked for me.

http://xbmc.sourceforge.net/python-docs/...ow-doModal
http://xbmc.sourceforge.net/python-docs/...indow-show

EDIT:
I just realized what I did wrong in the code I gave you,
Then code should be placed in the onInit() function instead of __init_(),
xbmc doesn't draw the control until after the __init__ function is called

So it should be like this:
Code:
# Import the XBMC/XBMCGUI modules.
import xbmc, xbmcgui, time

class MyScript(xbmcgui.Window):

    def onInit(self):
        curSeconds = time.time()
        imgControl = xbmcgui.ControlImage(100, 0, 1080, 720, "")
        self.addControl(imgControl)
        while (time.time() - curSeconds <= 10):
            imgControl.setImage("")
            imgControl.setImage("special://masterprofile/media/bell.jpg")
            xbmc.sleep(500)

        self.close()

My_Window = MyScript()
My_Window.doModal()
del My_Window
Reply


Messages In This Thread
RE: I'm terrible at python and need your help with two questions - by Kr0nZ - 2013-02-18, 21:34
Logout Mark Read Team Forum Stats Members Help
I'm terrible at python and need your help with two questions0