2006-05-01, 16:05
hi,
i lately added support for the 'xport' way of sending params to programs from xbmc.
however, it is only accessible via shortcut .cut files.
example
<shortcut>
<path>f:\emulators\foo\bar.xbe</path>
<custom>
<game>d:\roms\foo.zip</game>
</custom>
</shortcut>
this can be used from python to create e.g. favorite rom scripts or whatever. basic example underneath (thanks donno)
maybe somebody will find this useful..
i lately added support for the 'xport' way of sending params to programs from xbmc.
however, it is only accessible via shortcut .cut files.
example
<shortcut>
<path>f:\emulators\foo\bar.xbe</path>
<custom>
<game>d:\roms\foo.zip</game>
</custom>
</shortcut>
this can be used from python to create e.g. favorite rom scripts or whatever. basic example underneath (thanks donno)
Quote:import xbmc
import xbmcgui
import os
emu = "f:\\emulators\\xboyadvance\\default.xbe"
dir = "f:\\emulators\\xboyadvance\\gbaroms\\"
def savecut(name):
f = open("z:\\emu.cut","w")
d = "<shortcut><path>%s</path><custom><game>%s</game></custom></shortcut>" % (emu,name)
f.write(d)
f.close()
def checkdir(tdir):
dl = os.listdir(tdir)
ret = xbmcgui.dialog().select("choose rom",dl)
if os.path.isdir(tdir+dl[ret]):
checkdir(tdir+dl[ret])
else:
savecut(tdir+dl[ret])
xbmc.executebuiltin('xbmc.runxbe(z:\\emu.cut)')
checkdir(dir)
maybe somebody will find this useful..