Page 1 of 1
Re: Run suball script hidden
Posted: 25 Jul 2017, 14:46
by rednoah
Doesn't running a batch file always open a console window?
You could do something like this:
viewtopic.php?f=4&t=5157
Re: Run suball script hidden
Posted: 25 Jul 2017, 16:46
by rednoah
Unfortunately, Windows makes it very tricky to run command-line executables without CMD popping up.
You're running a vbs script with the wscript executable. I'd use a python script and run it with the pythonw executable. It's exactly the same thing, but I'd argue that python is more user friendly than vbs.

Re: Run suball script hidden
Posted: 25 Jul 2017, 18:56
by rednoah
You could write a generic python script that simply takes a number of arguments and then executes that as a command. The utorrent-postprocess.pyw script is not that.
Please read the script, understand what it does, and then modify it to your needs. It's very easy to read and modify.
Re: Run suball script hidden
Posted: 25 Jul 2017, 19:38
by rednoah
Forget the bat file. Use a python file instead. Call filebot from the python file.
You already have a working example for filebot/amc calls:
https://github.com/filebot/plugins/blob ... rocess.pyw
Now you just need to slightly modify that to call suball with the arguments you want:
Code: Select all
command = [
'filebot', '-script', 'fn:amc',
...
]
subprocess.run(command, creationflags=0x08000000)
Re: Run suball script hidden
Posted: 26 Jul 2017, 03:00
by rednoah
1.
Does it not? What have you tried?
2.
Open CMD. Run it. See what the output says. If you use
python you will see output. If you use
pythonw you won't see output.
Code: Select all
# Test with Console:
# python "C:\path\to\utorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"
Re: Run suball script hidden
Posted: 26 Jul 2017, 09:42
by rednoah
Since you're using the filebot command-line tools, I assume that you have at least very basic command-line skills.
You have a python script, you run it with the python executable. It takes 10 seconds and you can't really go wrong anywhere...
Anything you can run with CMD, can be scheduled with Windows Scheduler, so you've got that covered as well.
1. Create script
2. Run script
3. Done
Now we have something that works. A few small modifications and it'll do what you want it to do. It's extremely simple.
Re: Run suball script hidden
Posted: 26 Jul 2017, 10:32
by rednoah
I've added another python script that will just execute a generic command passed in via command-line arguments:
https://github.com/filebot/plugins/blob ... t/runw.pyw
e.g.
Code: Select all
pythonw /path/to/runw.pyw filebot -script fn:sysinfo
Re: Run suball script hidden
Posted: 26 Jul 2017, 19:28
by ZeroByDivide
rednoah wrote: ↑25 Jul 2017, 16:46
Unfortunately, Windows makes it very tricky to run command-line executables without CMD popping up.
I am able to run command-line executables (.bat, .cmd, .batch) without the CMD popping up just fine and I've never done anything fancy at all. The only time it'll ever pop up a cmd window is if I run the command-line executable manually (or if I'm running a .sh command-line executable since it's the only one I've never had suppressed for some reason), doing it through torrent clients/windows service/task scheduler or what have you it never pops up a window or anything. TBH it's one reason why I don't understand this post here - >
viewtopic.php?f=4&t=5157 currently since it's already suppressed/doesn't pop up the cmd window.
Forn73 wrote: ↑26 Jul 2017, 18:35
Thank you for your effort!
Where does the suball script stores its logs? I can only find "AppData\Roaming\Filebot\logs\amc.log" Otherwise I don't know if it's working...
I think it's just the amc.log for the suball script just like any other script, it'll end up in the default location unless you specify where you want the log to go.
Re: Run suball script hidden
Posted: 26 Jul 2017, 20:02
by ZeroByDivide
Forn73 wrote: ↑26 Jul 2017, 19:56
And where is the default location? AppData? Windows?
believe it's the location you found in your post above, I don't really know the default log location since I don't have the logs point to the default location since I use
in my code so I just point it to where I want so I can easily get the logs when needed instead of traversing through tons of folders to get to the logs.
Re: Run suball script hidden
Posted: 26 Jul 2017, 20:50
by rednoah
Specify a log file:
Now you know where the log is.