QR-Code-Recognition
Command Description
Identify single or multiple QR code information from the specified screen range
Command Prototype
arrayText = QRCodeEx.ScreenQRCode(objElement,objRect,iTimeOut)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objElement | True | expression | {} | Use mouse to select or cut off the target screen area including window, elements, range, etc |
objRect | True | dictionary | {"x":0,"y":0,"width":0,"height":0} | The range that needs to be searched, the program will recognize in this range of the control, if the range is passed as {"x":0,"y":0,"width":0,"height":0}, then the control rectangle area Recognition within the scope |
iTimeOut | True | number | 30000 | Specify the time in milliseconds to wait for a retry to find the text. If exceeded, an error will be thrown. Default: 30,000 milliseconds (30 seconds) |
return
arrayText,The variable used to save the output of the command.
Demo
TracePrint("--------------------------Screen QR code recognition--------------- ------------")
//-------------------------------------------------------------------------------
//[Remarks] Identify single or multiple QR code information from the specified screen range.
//Input parameter 1:
// objElement--Identifies the target. Note: Use the mouse to select or capture the target screen range to be identified. Contains information such as window, element, scope, etc.
// objRect--Identification range. Note: The range to be searched, the program will identify within the range of the control, if the range is passed as {"x":0,"y":0,"width":0,"height":0}, then Recognition within the control rectangle area
// iTimeOut--timeout time (milliseconds). Note: Specifies the time (in milliseconds) to wait to retry to find screen extents, and throw an exception if it exceeds that time. Default 30000 milliseconds (30 seconds)
//out parameters:
// arrayText--The variable to which the output of the function call is saved.
//Command prototype: arrayText = QRCodeEx.ScreenQRCode(objElement,objRect,iTimeOut)
#icon("@res:b5c39a70-7f27-11ec-ab08-1d7b5faf0fee.png")
arrayText = QRCodeEx.ScreenQRCode({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"Baidu, you will know - Google Chrome","app":"chrome"} ]},{"x":0,"y":0,"width":0,"height":0},30000)
TracePrint(arrayText)