Skip to content

Instantly share code, notes, and snippets.

@roxlu roxlu/
Created Oct 6, 2016

What would you like to do?
Script to focus application (Windows 10 shows taskbar when application starts) (source:
call :focus "Title of Window"
timeout /t 10 /nobreak > NUL
goto start
::exit /b
setlocal EnableDelayedExpansion
if ["%~1"] equ [""] (
echo Please give the window's title.
exit /b
set pr=%~1
set pr=!pr:"=!
echo CreateObject("").appactivate "!pr!" > "%tmp%\focus.vbs"
call "%tmp%\focus.vbs"
del "%tmp%\focus.vbs"
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.