05-06-2019, 11:44 PM
and here is my crack at making it shorter
Function Function18
Function Function18
typelib WinHttp {662901FC-6951-4854-9EB2-D9A2570F2B2E} 5.1
WinHttp.WinHttpRequest r._create
r.Open("POST" "https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic?access_token=24.b305c9822131e65eda05e29c157dd719.2592000.1559103982.282335-16139329")
r.setRequestHeader("content-type", "application/x-www-form-urlencoded") ;r.SetRequestHeader("language_type" , "CHN_ENG")
str sFile.getfile("$desktop$\3.png");; change to file location
str base64.encrypt(4 sFile "" 2) ;base64.escape(9)
r.Send(F"&image={base64}") ;ARRAY(byte) by= r.ResponseBody
str json.fromn(&by[0] by.len) ;out json