스톤에이지 매크로 처음 제작해보는데요 'ㅅ'
Gdip,Gdip lmageSearch 둘다 다운받았고
어떤분이 만드신 소스로 작성해서 매크로를 작동시켰는데 게임화면 외각만 반짝반짝 거리면서 작동을 안합니다 프로그램은 녹스 사용하고 있어용 왜 하얀색으로 반짝반짝 하는지 알려주실분 구해요
#include Gdip.ahk
#include Gdip_ImageSearch.ahk
F3::
Start:
Loop{
If(IsImagePlus(ClickX, ClickY, "image\완료된레이드.bmp",60,0))
{
클릭(ClickX, ClickY)
Sleep,1000
If(IsImagePlus(ClicKX, ClickY, "Image\보상받기.bmp",60,0))
{
클릭(ClickX, ClickY)
Sleep,1000
클릭(500,500)
Sleep,1500
If(IsImagePlus(ClicKX, ClickY, "Image\보상확인.bmp",60,0))
{
클릭(ClickX, ClickY)
}
}
}
If(IsImagePlus(ClickX, ClickY, "image\참여.bmp",60,0)
||IsImagePlus(ClickX, ClickY, "image\협공.bmp",60,0))
{
클릭(ClickX, ClickY)
Sleep,1000
If(IsImagePlus(ClickX, ClickY, "image\시작.bmp",60,0))
{
클릭(ClickX, ClickY)
Sleep,1000
}
If(IsImagePlus(ClickX, ClickY, "image\소탕.bmp",60,0))
{
클릭(ClickX, ClickY)
Sleep,3000
;소탕 := 소탕 + 1
If(IsImagePlus(ClickX, ClickY, "image\성공.bmp",60,0))
{
클릭(711,472)
;레이드성공 := 레이드성공 + 1
}
else If(IsImagePlus(ClickX, ClickY, "image\패배.bmp",60,0))
{
클릭(711,472)
;레이드실패 := 레이드실패 + 1
Sleep,1000
클릭(34,68)
Sleep,2000
클릭(943,92)
}
else If(IsImagePlus(ClickX, ClickY, "image\완료된보스.bmp",60,0))
{
;완료된보스 := 완료된보스 + 1
Sleep,500
클릭(513,429) ; 수정
Sleep,500
}
}
}
If(IsImagePlus(ClickX, ClickY, "image\새로고침.bmp",60,0))
{
;msgbox, 새로고침시작
클릭(ClickX,ClickY)
Sleep,500
}
}
클릭(x, y)
{
x := x+2
y := y+34
Coor := x | y<<16
WinGet, ActiveID, ID, StoneAge
if(x = 0 && y = 0)
{
return false
}
if not getkeystate("Ctrl" , "p")
{
PostMessage, 0x201, 0, %Coor%,, ahk_id %ActiveID%
PostMessage, 0x201, 1, %Coor%,, ahk_id %ActiveID%
}
else if getkeystate("Ctrl" , "p")
{
Loop
{
if not getkeystate("Ctrl" , "p")
{
PostMessage, 0x201, 0, %Coor%,, ahk_id %ActiveID%
PostMessage, 0x201, 1, %Coor%,, ahk_id %ActiveID%
break
}
sleep, 100
}
}
}
IsImagePlus(ByRef clickX, ByRef clickY, ImageName, errorRange, trans, sX = 0, sY = 0, eX = 0, eY = 0)
{
WinGet, Title , ID, StoneAge
if(Gdip_ImageSearchWithHwnd(Title, clickX, clickY,ImageName,errorRange,trans, sX, sY, eX, eY))
{
return true
}
else
return false
}
Gdip_ImageSearchWithHwnd(Hwnd,Byref X,Byref Y,Image,Variation=0,Trans="",sX = 0,sY = 0,eX = 0,eY = 0)
{
SysGet, wFrame, 7
SysGet, wCaption, 4
gdipToken := Gdip_Startup()
bmpHaystack := Gdip_BitmapFromHwnd(Hwnd)
bmpNeedle := Gdip_CreateBitmapFromFile(Image)
if( sX!= 0 || sY!= 0 || eX!= 0 || eY != 0)
{
sX := sX + wFrame
sY := sY + wCaption + wFrame
eX := eX + wFrame
eY := eY + wCaption + wFrame
}
RET := Gdip_ImageSearch(bmpHaystack,bmpNeedle,LIST,sX,sY,eX,eY,Variation,Trans,1,1)
Gdip_DisposeImage(bmpHaystack)
Gdip_DisposeImage(bmpNeedle)
Gdip_Shutdown(gdipToken)
StringSplit, LISTArray, LIST, `,
X := LISTArray1 - wFrame
Y := LISTArray2 - wCaption - wFrame
if(RET = 1)
{
return true
}
else
{
return false
}
}
이렇게 코딩을 다해야되는군요...