Skip to main content


Command Description

Use Laiye IDP to identify CHAPTCHA of the specified image and return results

Command Prototype

sRet = Mage.ImageOCRVerifyCode(path,config,time)

Parameter Description

pathTruepath'''C:\Users'''To identify the path of the image, support jpeg, jpg, png, bmp, gif and other formats
configTrueexpression{}Call configuration of Laiye IDP
timeTruenumber30000Specify the waiting time in milliseconds. If exceeded, an exception will be thrown. Default: 30,000 milliseconds (30 seconds)


sRet,The variable used to save the output of the command.


Dim path=''''''  //  The path of the verification code of the image to be recognized 
Dim config={"Pubkey":"","Secret":"","Url":""} // Get from mage

TracePrint "--------------------Image verification code recognition--------------------"
// --------------------------------------------------------
// [Remarks] Image verification code recognition
// Input parameter 1:
// path--The path of the image to be recognized
// Input parameter 2:
// config--mage configuration, need to configure Pubkey and Secret.Type:Dict
// Input parameter 3:
// time--timeout time. Default unit: milliseconds. Type: Int

// Output parameters:
// sRet--the variable to which the output of the function call is saved

// Command prototype: sRet = Mage.ImageOCRVerifyCode(path,config,time)
// --------------------------------------------------------

sRet = Mage.ImageOCRVerifyCode (path, config, 30000)