I'm looking for a command that can bring a window into focus. The command has to work in a cygwin terminal, but I imagine this command will be built into Windows, so it's worth saying I'm using Windows 10. I figure this command exists, but I've been unable to find it from googling.
I'm basically asking this but with cygwin instead of Ubuntu: Bash command to focus a specific window
These vbs scripts look promising, but when I execute them in cygwin, they neither error, nor change focus. CMD command in Windows to switch to an already open application It's as if AppActivate is a noop.
I'm running wscript.exe switch.vbs "App Title" with this script:
WScript.CreateObject("WScript.Shell").AppActivate(WScript.Arguments.Item(0))
It's probably wise to state why I want this functionality: I've made it so that when my tests run from my cygwin commandline, it notifies me the way Windows 10 does with any normal event: with an event bubble. The command I'm using to create that notification (notifu) returns different exit codes depending on what happened to the bubble. It'll return an exit code of 3 if I click on it, but whatever window was focused remains in focus. Instead, I want to click on the bubble and focus my cygwin terminal.