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.
Any advice on best combination here?