Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Start new console without focus

Apr
35
0
I use start regularly to kick off other command line servers or batch processes to happen in the background. It'd sure help to have an option to not set focus to the new window, but keep focus on the current console. The new consoles have to be visible to see their output and close them if need be so /inv isn't an option. I'm currently using a delay then activate, but it slows down workflow waiting for the returned focus. Before I file a feature request, wanted to make sure I'm not missing something. thanks!
 
I use start regularly to kick off other command line servers or batch processes to happen in the background. It'd sure help to have an option to not set focus to the new window, but keep focus on the current console. The new consoles have to be visible to see their output and close them if need be so /inv isn't an option. I'm currently using a delay then activate, but it slows down workflow waiting for the returned focus. Before I file a feature request, wanted to make sure I'm not missing something. thanks!

Not sure if this is a possible solution for you, but it works on my XP system;

Code:
start /tab "%_cmdspec" %+ delay 1 %+ keystack ctrl-tab

or

Code:
start /tab mybatch.btm %+ delay 1 %+ keystack ctrl-tab
 
Your delay may vary.
 
Joe
 
Thanks for the reply! I kick off a number of processes and they're in separate non-tabbed TCC consoles. Here's what I'm using for now. Essentially the same thing you've got there, just using activate instead of key stuffing. I put this line in my aliases.txt my startup reads from:
Code:
activateme              set _savedtitle=%_wintitle %+ set _tmptitle=activateme%@random[0,9999999] %+ title %_tmptitle %+ activate %_tmptitle %+ title %_savedtitle
then use in batch files:
Code:
delay 1 %+ activateme
 
I use start regularly to kick off other command line servers or batch processes to happen in the background. It'd sure help to have an option to not set focus to the new window, but keep focus on the current console. The new consoles have to be visible to see their output and close them if need be so /inv isn't an option. I'm currently using a delay then activate, but it slows down workflow waiting for the returned focus. Before I file a feature request, wanted to make sure I'm not missing something. thanks!
Noah, exactly what do you want to happen? Typically, a new console will be in the same place as the one from which it was started (or nearly so if Windows is cascading console windows). It's pretty easy to start an app without input focus but regardless of that, how do you expect it to appear ... on top of the current console (thus obscuring the console with focus), or behind the current console (thus being obscured itself).
 

Similar threads

Back
Top