一段很有用的代码
while(true){
//找文件选择器
//winex.findEx(
var baseHund=winex.findEx(,,"#32770","打开")
win.delay(2000)
var hwnd=winex.findEx(baseHwnd,,"Edit","")
//console.debug("hwnd",hwnd)
winex.say("D:\用户目录\我的图片\1.jpg",hwnd)
var hwnd2=winex.findEx(baseHwnd,,"Button","打开")
winex.click(hwnd2)
var baseHind=winex.findEx(,,"#32770","打开")
if(!baseHwnd){
break
}else{
console.debug("_上传图片,上传窗口还在")
}
}
另一段有用代码
wb.onwebResourceResponseReceived(winform.hwnd,function(request,response){
if(..string.startwith(request.Uri,"https://h5api.m.taobao.com/h5/mtop.taobac.idy.resource.shop.infc.get",true)){
wb.aardio.GetcontentAsync(response,function(data){
var userdata = web.json.tryParse(data);
if(userdata!=null){
userdata = userdata.data.result
if(global.message){
global.message.plus.foreground = inet.http.get(userdata.avatar);
global.message.plus7.text = userdata.displayNick;
}
}
},function(err){
console.dump(err);
}
)
}
})
wb.devToolsMethod(winform.hwnd,"Network.enable",'{"maxResourceBuffersize":314s728o}')
评论 (0)