(2016-11-11, 06:41)firewater Wrote: This is really cool, but is there any way you can turn this into an add-on?
Unfortunately, no, as this changes Kodi core behavior, which cannot be achieved from within an add-on.
(2016-11-11, 06:41)firewater Wrote: Devs are bound to abandon their projects at some moment, and since this looks like won't get added to the official build, we would get stuck forever on whatever was the last version you updated.
Yes, that might of course happen once I lose interest in Kodi or my use case changes. However, the benefit of Open Source is that everybody can read, change or re-use the code. So you can always take my patch and adapt it to new versions, improve it, do whatever you like with it, as long as you comply with the GPLv2.
(2016-11-11, 06:41)firewater Wrote: edit: oh boy, it doesn't work for my purposes. I run a .bat through Kodi's autoexec.py with the following code:
Code:
import xbmc
xbmc.executebuiltin('XBMC.System.Exec(""C:\\Users\\firewater\\Kodi\\portable_data\\userdata\\nfo.bat"")')
Losing it, still.
Oops, my bad. I forgot to take care of restoring topmost state after running external programs (which is what you are doing). I'll look into it, should be fixed in the next build.
In the meantime, you could use the following code instead, if you don't need to see the output of your BAT file:
Code:
import subprocess
subprocess.call(['C:\\Users\\firewater\\Kodi\\portable_data\\userdata\\nfo.bat'])
This won't minimize Kodi while the BAT is running, so the topmost state isn't lost.