This is my new code, it is better understood
Macro Macro8
Thank you for your help, I just learned that it is an xml component.
@Kevin
I feel using the current components(MSXML2.ServerXMLHTTP), the response is faster
Macro Macro8
typelib MSXML2 {F5078F18-C551-11D3-89B9-0000F81FE221} 3.0
MSXML2.ServerXMLHTTP r._create
r.Open("POST" F"https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic")
r.setRequestHeader("content-type", "application/x-www-form-urlencoded")
r.SetRequestHeader("cache-control" , "no-cache")
str access= "access_token=24.b305c9822131e65eda05e29c157dd719.2592000.1559103982.282335-16139329&image="
str sFile.getfile("$desktop$\1.png");; change to file location
_s.encrypt(4 sFile "" 2)
_s.escape(9)
r.Send(F"{access}{_s}")
IXml x=JsonToXml(r.ResponseText)
ARRAY(IXmlNode) a
x.Path("root/words_result/item/words" a 1)
str d
for(int'i 0 a.len)
,d.addline(a[i].Value)
mes d.trim
Thank you for your help, I just learned that it is an xml component.
@Kevin
I feel using the current components(MSXML2.ServerXMLHTTP), the response is faster