Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimize the output of pscmd
#16
Run successfully using the code below
in the ps code, variable Cannot be included
 $pic='{s1.expandpath}';


Macro PS2
Code:
Copy      Help
str s1="$desktop$\1.png"
_s=
F
;Add-Type -AssemblyName System.Web;
;$url='https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic';
;$pic='C:\1.png';
;$imagedata=[Web.HttpUtility]::UrlEncode([Convert]::ToBase64String([IO.File]::ReadAllBytes($pic)));
;$poststr=@(
;;;;;'access_token=24.b305c9822131e65eda05e29c157dd719.2592000.1559103982.282335-16139329',
;;;;;$('image='+$imagedata),
;;;;;'language_type=CHN_ENG',
;;;;;'detect_direction=false',
;;;;;'detect_language=false',
;;;;;'probability=false'
;) -join '&';
;$web=New-Object System.Net.WebClient;
;$web.Headers.Add('Content-Type', 'application/x-www-form-urlencoded');
;[byte[]]$postdata=[Text.Encoding]::UTF8.GetBytes($poststr);
;[byte[]]$responsedata=$web.UploadData($url, 'POST', $postdata);
;[Text.Encoding]::UTF8.GetString($responsedata);

str s
PsCmd _s "-Version 2.0" s
mes s

Is there a solution? Smile


Messages In This Thread
Optimize the output of pscmd - by win - 05-05-2019, 11:48 PM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 03:43 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 04:44 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 04:57 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 06:15 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:21 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:35 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:41 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:55 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:05 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:12 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:15 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:26 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 09:02 AM
RE: Optimize the output of pscmd - by win - 05-07-2019, 11:48 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 03:54 AM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 04:25 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 05:42 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 09:37 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 12:51 PM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 01:05 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 01:17 PM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:19 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:36 AM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:40 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:43 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)