2016-08-30, 19:29
Thanks I found the addon cron that works well for my needs.
Sent from my iPhone
Sent from my iPhone
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("start.cmd"), 0, True
start "" "process.exe"
exit
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("stop.cmd"), 0, True
taskkill /F /IM process.exe
exit
(2016-09-03, 00:36)Magicool Wrote: Hi,
I try to run *.cmd script and hide the cmd window using VBScript and so far I fail. It looks like only the VBScript is launched and the *.cmd is ignored. I am using Windows 10 64b and Kodi 16.
The scripts I need to run on playback started and playback ended are:
start.vbs:
start.cmd:Code:Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("start.cmd"), 0, True
stop.vbs:Code:start "" "process.exe"
exit
stop.cmd:Code:Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("stop.cmd"), 0, True
I hope you can help me!Code:taskkill /F /IM process.exe
exit
(2016-09-13, 05:54)dannyrobbo Wrote: Firstly massive thanks to @KenV99 for the addon
Ive been trying to find a way to run a python script on startup for a while and now all sorted!
Im new to the more advanced side of kodi, commands and scripting in general so this may be a really dumb question or simple process, but I've read through the thread (what i understood of it!) and don't think its been discussed, so thought id ask!
Is it possible to make a Task/Event that executes a python script when i change which Home Menu Item I'm on, on the home screen? So if I'm on weather (for example) then change to another item it would execute.
thanks for reading and any advice or info would be much appreciated
(2016-03-27, 21:38)KenV99 Wrote:(2016-03-27, 21:03)brazen1 Wrote: Hi.I assume that you are using the onPlaybackStarted event?
Ran across your add-on and thought I'd give it a try. I seem to be having problems after spending a couple hours trying to config.
My goal is to enable Windows 10 Stereoscopic mode when playing back a 3D.iso and disable it when finished with playback.
I have working .bat files to enable and disable using Nvidia's nvstlink.exe.
I point to these .bat files using your player start and player end tasks and they indeed switch using Script as the type.
The problems are:
Stereoscopic MUST be enabled before playback actually begins. This bat has to take priority before KODI itself does otherwise KODI starts 3D mode switching incorrectly. I assume there is no way around this since the title has to be called 1st to trigger the add-on after numerous tries?
Then yes, there is no way to intercept that with this addon before it plays.
The only way I could see you doing this is writing python that immediately stops the file from playing, then does what you need and then restart it.
You might be able to do it from a batch file if you are adept at writing curl commands and you could then use the JSON-RPC.
(2016-03-27, 21:03)brazen1 Wrote: I've added "*3D.iso" to the variable but stereoscopic switches into 3D upon start of a 2D.mkv which makes no sense to me but I'm not a coder.I don't know what you mean here. In playercorefactory.xml?
(2016-03-27, 21:03)brazen1 Wrote: Can you help me achieve what I'm trying to do?
I'm on W10 using a variant of v.17 (afedchin's new 3D MVC build in the development thread)
This workaround may help Nvidia users be included in the upcoming KODI 3D MVC advancement and I'm eager to test if it can be accomplished.
Thanks for any assistance the community might offer.
(2016-10-26, 15:03)KenV99 Wrote: It all depends on what language you are most comfortable scripting in.
In python, you could retrieve the filename use any number of means to ascertain whether the filename contains the substring you designate for the type of video.
Then use: 'result = xbmc.executeJSONRPC(query)' where 'query' represents a properly formatted JSON command for the resolution switch.
22:26:38 T:8640 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named mymodulename
Traceback (most recent call last):
File "C:\Users\Name\scripts\filename.py", line 1, in <module>
from mymodulename import ModuleImport
ImportError: No module named mymodulename
-->End of Python script error report<--