Get-Text-after-Intelligent-Recognition
Command Description
Returns the detected text after conducting UI detection
Command Prototype
sRet = UiDetection.Get(objUiElement,sType,iTimeout,optionArgs)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objUiElement | True | expression | {} | Select the recognized target of Computer Vision and the feature values of the anchor element |
sType | True | enum | "OCR" | OCR mode uses Identification box to select area; Selecting all by simulating the mouse to draw text from left to right in target area |
iTimeout | True | number | 30000 | The amount of time to wait for command retries before "Find Target" throws an exception. Default: 30000 ms (30 seconds) |
bContinueOnError | None | boolean | None | Specify whether the automation should continue to support this field even if the activity is incorrect, it is only supported by the Boolean value (true, false) default value |
iDelayAfter | None | number | 300 | Delay time (in milliseconds) after executing the activity is 300 milliseconds |
iDelayBefore | None | number | 200 | The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds |
return
sRet,The variable used to save the output of the command.
Demo
TracePrint("--------------------------Get the text after intelligent recognition---------------- -------------")
//-------------------------------------------------------------------------------
//[Remarks] Get the intelligently recognized text. (This command must be used together with the intelligent recognition screen range)
//Input parameter 1:
// objUiElement--Identifies the target. Note: The eigenvalues of the selected intelligently recognized target element and anchor element
// sType--click type. Note: The OCR method is the selection range of the recognition frame; the selection of all methods is to simulate the mouse to draw the text from left to right in the target
// iTimeOut--timeout time. Note: The amount of time, in milliseconds, to wait for the command to retry the run before the lookup target throws an exception. Default 30000 (30 seconds)
// optionArgs--Optional parameters. Note: This parameter is a number of optional parameters, including error continue execution, delay after execution, delay before execution, activation window, cursor position, abscissa offset, ordinate offset, auxiliary keys, operation type
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//Command prototype: sRet = UiDetection.Get(objUiElement,sType,iTimeout,optionArgs)
#icon("@res:f334e0e0-7f21-11ec-ab08-1d7b5faf0fee.png")
sRet = UiDetection.Get({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"Click - Feishu Cloud Documents - Google Chrome","app":"chrome "}],"cv_engine_version":1,"cv_region":{"x":0,"y":0,"width":0,"height":0},"cv_descriptor":{"anchors":[ {"cls_type":100,"height":41,"text":"click after intelligent recognition","width":205,"x":584,"y":296}],"confidence":0.800000011920929, "cv_handle":"\"2b3223b0-7f20-11ec-ab08-1d7b5faf0fee\"","match_version":1,"target":{"cls_type":100,"height":33,"text":"Command description ","width":99,"x":586,"y":357}}},"OCR",30000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
TracePrint (sRet)