cbruce Posted March 1, 2019 Share Posted March 1, 2019 VIPRE antivirus pops up obnoxious windows for every stupid thing they do... "stopped some adware"... "running a scan"... etc. The reason they are obnoxious is that they grab focus and set themselves on top of the z-order. So I would like to kill them as soon as they appear. These windows have no TITLE - their CLASS has embedded brackets - the CLASS content changes for each instance - but the position is always the same. ;~ >>>> Window <<<< ;~ Title: ;~ Class: HwndWrapper[DefaultDomain;;a6efc34a-c4a7-4982-83c3-9a0d91ee4310] ;~ Position: 582, 50 ;~ Size: 448, 98 ;~ Style: 0x16080000 ;~ ExStyle: 0x00080008 ;~ Handle: 0x00000000000E188E ;~ >>>> Window <<<< ;~ Title: ;~ Class: HwndWrapper[DefaultDomain;;7ae0f835-68a7-4bde-93e4-17a78ad4ff53] ;~ Position: 582, 50 ;~ Size: 448, 98 ;~ Style: 0x16080000 ;~ ExStyle: 0x00080008 ;~ Handle: 0x00000000000518BA I have tried Opt("WinTitleMatchMode", 2) for subStr matching using: WinWait( "[CLASS:HwndWrapper[DefaultDomain;;]") WinWait( "[CLASS:HwndWrapper]") But I get no match with any of those. I've also tried matching by window position - but I don't think any of my attempts at the syntax have been correct WinWait( "582\50\448\98") WinWait( "X:582; Y:50; W:448; H:98") Local $aWaitPos[4] = [582, 50, 448, 98] WinWait( $aWaitPos) Any ideas on how to capture these windows? Thanks! Link to comment Share on other sites More sharing options...
Nine Posted March 1, 2019 Share Posted March 1, 2019 Uninstall bad AV - install good AV ? BrewManNH 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
cbruce Posted March 2, 2019 Author Share Posted March 2, 2019 53 minutes ago, Nine said: Uninstall bad AV - install good AV ? If we record your handle three times and play it backwards - does it say "Paul is dead"? I was actually hoping for a useful AutoIT based answer. [smile] Link to comment Share on other sites More sharing options...
LarsJ Posted March 2, 2019 Share Posted March 2, 2019 Personally, I would never use WinWait() in that way to wait for a window to appear. I would use code as in the first post here. When a window popup is detected, then I would test if it's the right window. With this technique you can use real regular expressions to test the window title. And you avoid your script being blocked by WinWait(), so you can use the same script for many other tasks simultaneously. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Nine Posted March 2, 2019 Share Posted March 2, 2019 (edited) 17 hours ago, cbruce said: If we record your handle three times and play it backwards - does it say "Paul is dead"? Nice reference with Number Nine - Congrats But using Larsj suggestion you would need to use _WinAPI_GetClassName ($lParam) since there is no title on your pop-up windows. Then you can use a simple StringInStr to check if it is the right window, and close it... Edited March 2, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now