PixelSearch with Screen Off

Ask gaming related questions (AHK v1.1 and older)
Ahk765
Posts: 1
Joined: 23 Jul 2021, 08:48

PixelSearch with Screen Off

Post by Ahk765 » 23 Jul 2021, 09:11

I'm writing various scripts that rely on the PixelSearch function to operate. For example:

Code: Select all

			while(not done) {
				PixelSearch, pX, pY, 875, 990, 895, 1010, 0x222E2F, 1, Fast
					if(ErrorLevel = 0) {
						done := true
						someFunction()
					}
				}
My code works great while the screen is on. I enabled the setting in windows that keeps your computer on when you shut your laptop, so I can keep running my code even while my laptop is shut. For any script that doesn't use PixelSearch this works fine, however it doesn't work when using PixelSearch. I'm wondering if there is any way to have PixelSearch still work even if the display is off so my code doesn't break when I shut my laptop screen. Or if there is another way for my code to work while it isn't being displayed on my screen.


Post Reply

Return to “Gaming Help (v1)”