Skip to main content


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

idTruestring$uuidThe unique identifier of the screen area recognized by Computer Vision cannot be repeated in the current process block. Otherwise it will cause operation error
objUiElementTrueexpression{}Use mouse to select or cut off the target screen area recognized by Computer Vision
objRectTruedictionary{"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
iTimeOutTruenumber30000The amount of time to wait for command retries before "Find Target" throws an exception. Default: 30000 ms (30 seconds)
sDetectTypeNoneenum"sLocalAI"The way of intelligent identification
bContinueOnErrorNonebooleanNoneSpecify 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
iDelayAfterNonenumber300Delay time (in milliseconds) after executing the activity is 300 milliseconds
iDelayBeforeNonenumber200The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds


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
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