My script recognizes the given image, but if two of the same images are present it will ignore the second one. I want to count it as found 2 times at different locations. There are five rows where the same text-image can appear:
Screen
Image
Output from line 113
[Results found]: Additional Damage of Critical Hits +1% found.
Source code (excerpt)
Func Awakes_adoch()
ToolTip('Scanning for adoch awakes', 0, 0)
$adoch1 = _ImageSearchArea("images/adoch/adoch1.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch1 = 1) Then
$awake_adoch_attribute_count += 1
EndIf
$adoch3 = _ImageSearchArea("images/adoch/adoch3.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch3 = 1) Then
$awake_adoch_attribute_count += 3
EndIf
$adoch5 = _ImageSearchArea("images/adoch/adoch5.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch5 = 1) Then
$awake_adoch_attribute_count += 5
EndIf
$adoch7 = _ImageSearchArea("images/adoch/adoch7.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch7 = 1) Then
$awake_adoch_attribute_count += 7
EndIf
$adoch9 = _ImageSearchArea("images/adoch/adoch9.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch9 = 1) Then
$awake_adoch_attribute_count += 9
EndIf
$adoch11 = _ImageSearchArea("images/adoch/adoch11.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch11 = 1) Then
$awake_adoch_attribute_count += 11
EndIf
$adoch13 = _ImageSearchArea("images/adoch/adoch13.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch13 = 1) Then
$awake_adoch_attribute_count += 13
EndIf
$adoch15 = _ImageSearchArea("images/adoch/adoch15.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch15 = 1) Then
$awake_adoch_attribute_count += 15
EndIf
$adoch17 = _ImageSearchArea("images/adoch/adoch17.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch17 = 1) Then
$awake_adoch_attribute_count += 17
EndIf
$adoch19 = _ImageSearchArea("images/adoch/adoch19.png", 1, 0, 0, 400, 390, $x, $y, 0)
If ($adoch19 = 1) Then
$awake_adoch_attribute_count += 19
EndIf
Sleep(50)
ToolTip('[Scan]: Additional Damage of Critical Hits +' & $awake_adoch_attribute_count & '% found.', 0, 0)
EndFunc
If the output window shows like below, it should be able to add up to 25:
Additional Damage of Critical Hits +3%
DEF + 40
Additional Damage of Critical Hits +3%
DEF + 4
Additional Damage of Critical Hits +19%
Another example:
I’m looking for a solution that doesn’t skip numbers or adds them from a previous shot to the next.