Patrik96 Posted June 17, 2022 Share Posted June 17, 2022 Hey guys. I am looking for a solution for many days, but couldn't find something that helps. (Posted the same question on Discord already and now trying to reach some more people here :)) I'm using the Webview2 UDF to create an embedded browser into my GUI. What i want do to now is, to detect some event depening on pixels(sadly pixels is the only way). Then my script would start a timer to show me how long the event lasts.(Basically want it to run 24/7 so it monitors permanently). This is how i quickly tested it: $handle = WinGetHandle("WebView2 Sample") $hdc = _WinAPI_GetDC ( $handle ) $pix=_WinAPI_GetPixel($hdc, 400 , 400) ;Need to do it via device context, otherwise my browser cannot be in background(not minimized, just behind other windows so i can keep using my pc) MsgBox(4096,"",Hex($pix,6)) While this doesn't work for WebView2, because it always gives me the same Pixelcolor over and over again for an empty window, it does work for FireFox.(Bot not for Chrome, lol) Alright, so i tho i am smart and simply added Firefox as a parent to my GUI using: _WinAPI_SetParent. However _WinAPI_GetPixel stops working if used on a Parent Window. And this is where the actual problem is. For some reason it cannot find any Pixel on a Parent. Even _WinAPI_PrintWindow returns a pure black image if used on parents. Anyone got an idea why this is happening or if i'm actually missing something? I could stick to Firefox itself without embedding it into my GUI, however my goal is to get this working like described above... Link to comment Share on other sites More sharing options...
Nine Posted June 20, 2022 Share Posted June 20, 2022 You may try this if you are on Win10: Use option 2 as described in the post. Patrik96 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...
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