gui,show,w100 h100 center,chapter11
gui,Add,Button,x0 y0 w100 h50 gStart,Start
gui,Add,Button,x0 y50 w100 h50 gStop,Stop
return

#Include Gdip.ahk
#Include Gdip_ImageSearch.ahk
#Include Search_img.ahk


PostClick(FoundX,FoundY){
lparam:=FoundX|FoundY<<16
PostMessage,0x201,1,%lparam%,,녹스 플레이어
PostMessage,0x202,0,%lparam%,,녹스 플레이어
Sleep, 1000


}

Start:
loop{
WinGet,Nox,ID,녹스 플레이어
if(Search_img("1.bmp",Nox,rx,ry)){    


Varx := -1800
Vary := 970
Random, vax, 0, %Varx%
Random, vay, 0, %Vary%
rx := rx + vax
ry := ry + vay
PostClick(rx,ry)
}

return

Stop:
ExitApp
return

GuiClose:
ExitApp
return
작동하지 않는 이유가뭘까요?

답글