Prevent cmd from stealing focus

Any questions? Need some help?
Post Reply
Arank
Posts: 12
Joined: 23 Oct 2013, 14:02

Prevent cmd from stealing focus

Post by Arank »

Hello, I'm trying to prevent the cmd from stealing focus (both on uTorrent and on Folder Watcher) following this method, but without sucess.
[Windows] Prevent cmd from stealing focus
If you're using this script with µTorrent on Windows you might find it annoying that it'll popup a cmd window stealing the focus each time.

Instead of using filebot.exe you can try using the GUI executable filebot.launcher.exe like this:

Code: Select all

filebot.launcher -script fn:amc --output "X:/path/to/media" --log-file amc.log --action copy --conflict override -non-strict --def "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
:idea: If you have PATH issues you try using the absolute path to the executable. :idea:


:arrow: Alternatively you can create a hidden filebot process with this tool: http://www.commandline.co.uk/chp/

Can someone explain it better please?

The cmd I use on the uTorrent is:

Code: Select all

filebot -script fn:amc --output "D:/ViNiCiUS/Videos" --log-file amc.log --action copy --conflict override -non-strict --def subtitles=pb,en music=n artwork=n --def plex=ViNiCiUS-PC "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" --def "seriesFormat=Seriados/{n.replaceTrailingBrackets()}/{n.replaceTrailingBrackets()} - {\"${s}ª Temporada\"}/{n.replaceTrailingBrackets()} - {s00e00} - {t}{\".$lang\"}" "movieFormat=Filmes/{n} ({y}){"Part$pi"}{\".$lang\"}"
Already tried to change the filebot to filebot.launcher, filebot.launcher.exe, and the absolute paths to, C:/Program Files/FileBot/filebot.launcher, C:/Program Files/FileBot/filebot.launcher.exe. And none works...

Already tried to use the CHP too, but my programing skills arent the best, so I couldn't actually do anything with it.



Thanks in advance!
Last edited by Arank on 26 Oct 2014, 22:57, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23942
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Prevent cmd from stealing focus

Post by rednoah »

Using filebot.launcher.exe will definitely not spawn a cmd window. Just try things from cmd first and see what error output you get.

Do you know why you need quotes?

Code: Select all

"C:/Program Files/FileBot/filebot.launcher.exe" ...
Read my cmdline primer => http://www.filebot.net/forums/viewtopic.php?f=4&t=1899
:idea: Please read the FAQ and How to Request Help.
Arank
Posts: 12
Joined: 23 Oct 2013, 14:02

Re: Prevent cmd from stealing focus

Post by Arank »

Do you know why you need quotes?

Code: Select all

"C:/Program Files/FileBot/filebot.launcher.exe" ...
Thanks for pointing it out, it's working perfectly now.
Post Reply