12-09-2014, 10:34 PM
and also to this one antidote..
ScanLoot(bmpHaystack)
found :=
Loop, 10
{
num := A_Index-1
bmpNeedle := Gdip_CreateBitmapFromFile( "images/" . num . ".png")
RET := Gdip_ImageSearch(bmpHaystack,bmpNeedle,LIST,0,0,0,0,5,0x000000,1,0)
Gdip_DisposeImage(bmpNeedle)
Loop, Parse, LIST, `n
{
StringSplit, Coord, A_LoopField, `,
found = %found%%Coord1%,%Coord2%,%num%`n
}
}
sort found, N ; sort list of found numbers by x coordinate
StringLeft, found, found, StrLen(found)-1
amt :=
; bring number together and return amount found
Loop, parse, found, `n
{
StringSplit, v, A_LoopField, `,
amt = %amt%%v3%
}
return amt
} - See more at: http://droidgagu.blogspot.com/2014/05/ho...Vnw4K.dpuf
ScanLoot(bmpHaystack)
found :=
Loop, 10
{
num := A_Index-1
bmpNeedle := Gdip_CreateBitmapFromFile( "images/" . num . ".png")
RET := Gdip_ImageSearch(bmpHaystack,bmpNeedle,LIST,0,0,0,0,5,0x000000,1,0)
Gdip_DisposeImage(bmpNeedle)
Loop, Parse, LIST, `n
{
StringSplit, Coord, A_LoopField, `,
found = %found%%Coord1%,%Coord2%,%num%`n
}
}
sort found, N ; sort list of found numbers by x coordinate
StringLeft, found, found, StrLen(found)-1
amt :=
; bring number together and return amount found
Loop, parse, found, `n
{
StringSplit, v, A_LoopField, `,
amt = %amt%%v3%
}
return amt
} - See more at: http://droidgagu.blogspot.com/2014/05/ho...Vnw4K.dpuf