Skip to content

Commit

Permalink
Update HotspotHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejGolian committed Oct 26, 2024
1 parent d0bded0 commit 38777ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HotspotHelper.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ GenerateHotspotsFromOCR() {
OCRLanguage := FirstOCRLanguage
Else
OCRLanguage := PreferredOCRLanguage
OCRResult := OCR.FromWindow("A", OCRLanguage)
OCRResult := OCR.FromWindow("A", OCRLanguage,, 1)
For OCRLine In OCRResult.Lines {
Hotspots.Push(Map("Label", "`"" . OCRLine.Text . "`" start", "XCoordinate", OCR.WordsBoundingRect(OCRLine.Words*).X, "YCoordinate", OCR.WordsBoundingRect(OCRLine.Words*).Y))
Hotspots.Push(Map("Label", "`"" . OCRLine.Text . "`" end", "XCoordinate", OCR.WordsBoundingRect(OCRLine.Words*).X + OCR.WordsBoundingRect(OCRLine.Words*).W, "YCoordinate", OCR.WordsBoundingRect(OCRLine.Words*).Y + OCR.WordsBoundingRect(OCRLine.Words*).H))
Expand Down Expand Up @@ -954,7 +954,7 @@ PerformOCR() {
Else
OCRLanguage := PreferredOCRLanguage
OCRLines := Array()
OCRResult := OCR.FromWindow("A", OCRLanguage)
OCRResult := OCR.FromWindow("A", OCRLanguage,, 1)
For OCRLine In OCRResult.Lines {
OCRLines.Push(Map("Text", OCRLine.Text, "X1", OCR.WordsBoundingRect(OCRLine.Words*).X, "Y1", OCR.WordsBoundingRect(OCRLine.Words*).Y, "X2", OCR.WordsBoundingRect(OCRLine.Words*).X + OCR.WordsBoundingRect(OCRLine.Words*).W, "Y2", OCR.WordsBoundingRect(OCRLine.Words*).Y + OCR.WordsBoundingRect(OCRLine.Words*).H))
}
Expand Down

0 comments on commit 38777ed

Please sign in to comment.