Code: Select all
;Pres P on keyboard to test
p::SearchPixels()
Esc::exitapp
SearchPixels(){
;DefinRegion
TLX = 1104
TLY = 373
BRX = 1422
BRY = 452
SomeText := "Found"
Gui,+AlwaysOnTop
Gui, Add, Text, cLime, %SomeText%
Gui, Show, xCenter yCenter
PixelSearch, FoundX, FoundY, TLX, TLY, BRX, BRY, 0xFFFFFF, 3, Fast RGB
if ErrorLevel {
MsgBox Not Found
} else {
MsgBox %SomeText%
}
Gui, Destroy ; Destroy the GUI
Return
}
Code: Select all
;Pres P on keyboard to test
p::SearchPixels()
Esc::exitapp
SearchPixels(){
;DefinRegion
TLX = 1104
TLY = 373
BRX = 1422
BRY = 452
SomeText := "Found"
PixelSearch, FoundX, FoundY, TLX, TLY, BRX, BRY, 0xFFFFFF, 3, Fast RGB
if ErrorLevel {
MsgBox Not Found
} else {
MsgBox %SomeText%
}
Return
}