@
ronie
Any chance you could make a small change to the script, something along the lines of this:
Code:
if ( __name__ == "__main__" ):
searchstring = None
if len(sys.argv) > 1:
try:
param = sys.argv[1]
if param.startswith('searchstring:'):
import urllib
searchstring = param.split(':')[1]
searchstring = urllib.unquote_plus(searchstring)
searchstring = searchstring.replace('\'', '')
searchstring = searchstring.replace('"', '')
except:
searchstring = None
if not searchstring:
keyboard = xbmc.Keyboard( '', __language__(32101), False )
keyboard.doModal()
if ( keyboard.isConfirmed() ):
searchstring = keyboard.getText()
if searchstring:
import gui
ui = gui.GUI( "script-globalsearch-main.xml", __cwd__, "Default", searchstring=searchstring )
ui.doModal()
del ui
sys.modules.clear()
This would allow the script to be initiated in code but with the search term pre-configured like this:
Code:
xbmc.executebuiltin('RunScript(script.globalsearch,searchstring:The%20Flintstones)')
The would be very useful for something I'm developing, and useful for other too of course
Edit:
Not to worry, I have achieved the same result using a bespoke loader for your GUI
Great script by the way!