Page 1 of 1

detecting and switching to non-VP windows

Posted: 6 Oct 2018 21:25
by daveplummermd
Hello

I am looking to detect an active window OUTSIDE of the VIP program and then switch to that window.

My VIP window doing the work is minimized.
1) A timer event detects active window (other program running...)
2) The user focuses away from this window.
3) program via timer event detects the change of window in focus and returns focus to the first window.

there are a number of built-in predicates that sound like they should work to achieve #1

Code: Select all

    getActiveWindow : () -> window ActiveWindow.     winGetActiveWindow : () - vpiDomains::windowHandle WindowHandle language c     runtimeLinknamesVpi::win_GetActiveWindow.     tryGetFocusWindow : () -> window FocusWindow determ.     winGetFocus : () -> vpiDomains::windowHandle WindowHandle determ.     tryGetForegroundWindow : () -> hwnd Window determ.     getForegroundWindow : () -> hwnd language apicall.
There is a similar batch of predicates that sound like they can return focus to the window or hwnd that returns from #1

Any advice on best combination here?