DarthLobster Posted Thursday at 03:10 AM Posted Thursday at 03:10 AM Hello. I wrote a script which uses pixelchecksum to detect changes in a small region of my screen. It works fine on my desktop PC, but it does not seem to be working on my laptop. I suspect it is getting the checksum of a different window. When I press alt+tab, the checksum detects a change. I have tried moving my cursor over the region, which should cause the checksum to change, but it doesn't register a change in the checksum of the region. I am using a discrete graphics card on my PC and an integrated graphics chip on my Laptop. My PC is using Windows 11 and my Laptop is using Windows 10. I tried changing the PixelCoordMode and tried forcing the hWnd in the function, but neither helped.
ioa747 Posted Thursday at 04:39 AM Posted Thursday at 04:39 AM I can only speculate. They have the same resolution and the same scale layout? pixelsearch 1 I know that I know nothing
DarthLobster Posted Thursday at 04:14 PM Author Posted Thursday at 04:14 PM No, but that shouldn't matter - each machine has a separate configuration file which determines the region scanned. The checksums don't need to match each other across machines, they just need to register changes within specific regions on the screen. I was searching for an hour or so earlier and saw somebody mentioning that PixelCheckSum can fail to run on a specific window and will run on the window beneath it, which I suspect may be what's happening, but I couldn't find any information about why that would happen or what I could do about it.
ioa747 Posted Thursday at 04:22 PM Posted Thursday at 04:22 PM One reason would be the elevated rights. I know that I know nothing
Nine Posted Thursday at 04:30 PM Posted Thursday at 04:30 PM You may want to try my Screen Scraping UDF. “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
DarthLobster Posted Thursday at 09:34 PM Author Posted Thursday at 09:34 PM 5 hours ago, ioa747 said: One reason would be the elevated rights. I am running AutoIt as administrator, if that's what you mean. Or would running the window I am trying to capture in administrator help? I don't believe I am running the window I am trying to capture as administrator on either machine, but I can try later.
Solution DarthLobster Posted Thursday at 10:17 PM Author Solution Posted Thursday at 10:17 PM 5 hours ago, Nine said: You may want to try my Screen Scraping UDF. While peeking at your thread there, it made me realize that my windows setting for window scaling was at 150% on my laptop, and I decided to try setting that to 100 to see if it made a difference, and it did. My script is working correctly now, I guess it was just looking in the wrong spot on the screen because of the window scaling. Very puzzling, because window scaling doesn't affect the application I'm running...
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