When I open a directory from "console2" by typing "start " the window sometimes runs in the background and focus stays in console2. If the folder is open and not minimized, the icon just flashes in the task bar and I have to hunt for it with the mouse to select it. Is there a way to force console2 to make explorer the focused window when I open a directory using the start command?
1 Answers
That is because "Explorer" (GUI application) is started from process, that belongs to real console window. Remember, it is always hidden and has no focus. The focus has "Console" window actually.
The solution - terminal emulator developer can process (with hooks) certain WinApi functions which may create new windows (dialogs, new applications, etc.) So, when console application (cmd in your case, I think) call start
- terminal emulator hook must change HWND
arguments to terminal's window.
So, you can switch to another terminal: ConEmu (I'm the author) or ConsoleZ (fork of Console). ConEmu is aware of described situations and all new windows must appears in front of terminal. Not sure about ConsoleZ, but that fork is alive and author can fix bugs if you report them.