Intelligent-Recognition-Screen-Range
Command Description
Creates an UI Detection scope for a given window or element and performs screen-wide image capture
Command Prototype
UiDetect Scope(id,objUiElement,objRect,iTimeOut,optionArgs)
End UiDetect
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
id | True | string | $uuid | The unique identifier of the screen area recognized by Computer Vision cannot be repeated in the current process block. Otherwise it will cause operation error |
objUiElement | True | expression | {} | Use mouse to select or cut off the target screen area recognized by Computer Vision |
objRect | True | dictionary | {"x":0,"y":0,"width":0,"height":0} | Perform text recognition in the search area. If the area is passed as {"x":0,"y":0,"width":0,"height":0}, then the text will be recognized in the rectangle area of the control element |
iTimeOut | True | number | 30000 | The amount of time to wait for command retries before "Find Target" throws an exception. Default: 30000 ms (30 seconds) |
sDetectType | None | enum | "sLocalAI" | The way of intelligent identification |
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 |
Demo
TracePrint("----------------------------Intelligently identify the screen range ----------------- ----------")
//-------------------------------------------------------------------------------
//[Remarks] Enables a block-level window that can only be recognized on a window or element, and can perform screen-wide image capture.
//Input parameter 1:
// id--unique key. Note: Intelligent identification of the unique identification of the screen range, repetition in the current process block may lead to operation errors
// objUiElement--Identifies the target. Note: Select or capture the target screen range that needs to be intelligently recognized by the mouse
// objRect--Identification range. Note: the range to be searched, the program will perform text recognition in the range of the control, if the range is passed as {"x":0,"y":0,"width":0,"height":0}, then Perform text recognition within the rectangular area of the control
// 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 identification method, error continuation execution, post-execution delay, and pre-execution delay
//out parameters:
// None
//Command prototype: UiDetect Scope(id,objUiElement,objRect,iTimeOut,optionArgs)
// End UiDetect
#icon("@res:3310e8f0-7f20-11ec-ab08-1d7b5faf0fee.png")
UiDetect Scope("2b3223b0-7f20-11ec-ab08-1d7b5faf0fee",{"wnd":[{"cls":"Chrome_WidgetWin_1","title":"Click - 飞书云文档 - Google Chrome","app":"chrome"}],"cv_engine_version":1},{"x":0,"y":0,"width":0,"height":0},30000,{"sDetectType":"sLocalAI","bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
End UiDetect