MatchResult:getLabel()
Returns the label associated with the match: the recognized text for an OCR match, or the template's label when one was set.
Signature
getLabel(): string
Returns
string - The label, or an empty string when none is associated.
Description
For text detection this is the text that matched, which is useful when the search used a substring or a case-insensitive comparison. For image detection it is usually empty.
Example
local result = Screen:find("submit", FinderParams():setDetectionType("TEXT"))
if result then
toast("Found: " .. result:getLabel())
end