2022-01-26, 06:17
Hi there,
Im trying to autoclose my dialog ok box like I have in the yes.no box but im up against to many arguments.
Can someone help?
Im trying to autoclose my dialog ok box like I have in the yes.no box but im up against to many arguments.
Can someone help?
Code:
import xbmc, xbmcaddon, xbmcgui
import time
import xbmc, sys
import requests
def MYIP(url='https://api.ipify.org/'):
ip = requests.get(url).content
dialog=xbmcgui.Dialog()
dialog.ok('IP ADDRESS',"[COLOR gold]Your IP Address is: [/COLOR] %s" % ip) # WOULD LIKE AUTOCLOSE THIS BOX
choice = xbmcgui.Dialog().yesno('TEST', 'view ip', nolabel='NO',yeslabel='YES', autoclose=int(10000))
if choice == 0:
dialog = xbmcgui.Dialog()
dialog.notification('[COLOR lime]KODI[/COLOR]', 'Test', xbmcgui.NOTIFICATION_INFO, 10000)
elif choice == 1:
MYIP()