//????????????????С
if(flen > 0)
{
if((filedes = fopen(file??"wb")) == NULL)
{
lr_output_message("oh cloud your Open File Failed!");
return -1;
}
fwrite( lr_eval_string("{pic}")??flen??1?? filedes );
fclose( filedes );
}
system( "c:\test1.bat" );    //??CMD????????????OCR????
/*
??C??????′????????????test1.bat:
#???????????????????
c:
cd
#????????JPG????TIF
convert.exe -compress none -depth 8 -alpha offtest1.jpg test1.tif
#????tesseract??????е?????????浽test1.txt?????
tesseract.exe test1.tif test1
#???????????????????
exit
*/
if((filedess = fopen("c:\test1.txt"??"rt")) == NULL)
{
lr_output_message("oh??cloud your Open File Failed!");
return -1;
}
fread( result??4??1??filedess );//??????ж???????
fclose( filedess );
lr_output_message("result: %s"?? result); //???????????????
lr_save_var(result??MAX_NAME_LEN??0??"VC" );
//???????λ???????????????
web_submit_data("UserAction"??
"Action=http://192.168.12.1:8080/action/UserAction"??
"Method=POST"??
"RecContentType=text/html"??
"Referer=http://192.168.12.1:8080/"??
"Snapshot=t2.inf"??
"Mode=HTML"??
ITEMDATA??
"Name=method"??"Value=login"?? ENDITEM??
"Name=goPage"??"Value=/index.html"?? ENDITEM??
"Name=currentPage"??"Value=/"?? ENDITEM??
"Name=username"??"Value=admin"?? ENDITEM??
"Name=password"??"Value=123456"?? ENDITEM??
"Name=ValidateCode"??"Value={VC}"?? ENDITEM?? //?????????????
"Name=loginSubmit"?? "Value=???"?? ENDITEM??
EXTRARES??
...
LAST);