Open x2nbit opened 1 day ago
The second param when instantiating the class is used to specify whether or not to use the virtual desktop (which includes all monitors) or just the main monitor, try this
#include ShinsImageScanClass.ahk
scan := new ShinsImageScanClass(0,0) ;0=desktop, 0=virtualdesktop
color := 0xFFFF0000
x := 2400
y := 500
if (scan.PixelPosition(color , x, y)) {
MsgBox % "Pixel found!"
}
oh,It's working. Thank you so much for a great library!
include ShinsImageScanClass.ahk
scan := ShinsImageScanClass() if scan.PixelPosition(refColor,x,y,0) { MsgBox "True" }
In a multi-monitor environment, it gets the color when the x,y coordinates are on the primary monitor, and doesn't work correctly when the x,y coordinates are on another monitor. Is there any way to make it work on all monitors?