auto.waitFor()
console.show()
if(!requestScreenCapture()){
toast("请求截图失败");
exit();
}
sleep(5000)
//开启权限后过一段时间才能成功截取
console.log(wzsb());
function wzsb(){
var client_id = "";
//API Key
var client_secret = "";
//Secret Key
var baidukey = "&client_id="+ client_id +"&client_secret="+ client_secret;
var as = http.get("https://aip.baidubce.com/oauth...ent_credentials" + baidukey);
as = as.body.json();
var token = as.access_token;
var img = captureScreen();
img = images.clip(img, 60, 600, 200, 100)
var imageBase64 = images.toBase64(img);
img.recycle()
var res = http.post("https://aip.baidubce.com/rest/...c?access_token=" + token,{headers:{
"Content-Type": 打开tao宝复制(_¥¥_)x-www-form-urlencoded"},
image:imageBase64,
image_type:"BASE64",
});
return res.body.string();
//返回结果
};
卧槽 我还以为是电脑用的
![]() | 2022-03-06 17:39 |
![]() | 2023-06-17 11:36 |
![]() | 2023-09-28 10:50 |
![]() | 2022-01-15 16:15 |
![]() | 2022-10-12 12:55 |
![]() | 2023-02-23 11:29 |
![]() | 2023-02-23 11:28 |
![]() | 2023-02-23 11:28 |
![]() | 2023-02-23 11:28 |
![]() | 2023-02-23 11:26 |