Read the AutoIT docs for WinWait() to see how to match windows other than by window title. The above will only reliably handle one window at a time. Alt+F11 to exit it at any time.Ĭhange $regexp to match "mIRC" or whatever. Modal popups may sometimes interfere with this, but it should be quite usable.The script will continue to run in the background after the watched program terminates. The last brown method works only if you can identify a character in the 1-127 ASCII range which is guaranteed to not be present in the variable. The While loop waits for the application to get the foreground, then drops it under again while keeping keyboard focus. If you change the bset -t &bin2 into bset -ta &bin2 the green method mimics bset -ta by storing the chr (233) as the 233 byte instead of UTF8-encoding it as the 2 bytes 195 169. "topmost" is a persistent window property that the WM maintains, there is no equivalent "bottom most", so we have to fudge it a bit. MsgBox(0,"Drop Window","No window title matching /" & $regexp & "/") uncomment next 3 lines to quit if no window _WinAPI_SetWindowPos($hWnd, $HWND_BOTTOM, 0, 0, 0, 0, $flags) _SendMessage($hWnd,$WM_SYSCOMMAND,$SC_MAXIMIZE) uncomment next line to maximize window first $flags = BitOr($SWP_NOMOVE,$SWP_NOSIZE,$SWP_NOACTIVATE,$SWP_ASYNCWINDOWPOS,$SWP_NOSENDCHANGING) Though I haven't used it extensively, the free Windows scripting tool AutoIT can do what you want with a short script: #include I don't believe it's maintained any more (last sighting was for WinXP). A long time ago, Windows had a PowerToy (later in TweakUI) called X-Mouse that, amongst other things, supported old-style X "focus follows mouse", where "focus" and "foreground" were not the same thing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |