Set focus onto a specific window using VBScript

AppActivate method available in VBScript can do this

Example to focus on Notepad is below:

Dim ObjShell :Set ObjShell = CreateObject("Wscript.Shell")
ObjShell.AppActivate("Notepad")

You can also wrap this around an HTA application to set program on the fly.