代码拉取完成,页面将自动刷新
/**
* 小瓶RPA演示demo,具体api请查看*流程开发文档*
* 官网:https://rpa.pbottle.com/
* 流程开发文档:https://gitee.com/pbottle/pbottle-rpa/wikis/pages
*/
const pbottleRPA = require('./pbottleRPA')
console.log("=== 测试 ===");
console.log(Date());
//监测是否开通企业版
let bufferRS = pbottleRPA.bufferSet('pbottle');
if (bufferRS == '个人版不可用') {
pbottleRPA.showMsg('个人版不可用','请先开通企业版')
pbottleRPA.tts('个人版不可用,请先开通企业版')
pbottleRPA.exit('⚠ 个人版不可用,请先开通企业版')
}
/**
* buffers
*/
pbottleRPA.sleep(200)
for (let index = 0; index < 10; index++) {
let content = "我是 +=<& buffer"+index
pbottleRPA.bufferSet(content,index)
}
pbottleRPA.sleep(200)
for (let index = 0; index < 10; index++) {
console.log('buffer'+ index + ' 内容:', pbottleRPA.bufferGet(index));
}
let other = '其他内容'
let myJson = {
name:'小瓶RPA',
webSite:'https://rpa.pbottle.com/',
version:2,
app:['pc','web','mobile'],
other,
}
pbottleRPA.bufferSet(myJson) //默认buffer0
console.log('获取buffer: ',pbottleRPA.bufferGet());
/**
* 启停
*/
let path=__filename;
console.log(path);
let url = 'http://127.0.0.1:49888/?action=pbottleRPA_run&path='+encodeURIComponent(path)
console.log(url);
fetch(url).then((rs)=>{
console.log(rs.status);
return rs.text()
}).then((txt)=>{
console.log('启动结果:',txt);
}).catch((error)=>{
console.log(error);
})
setTimeout(()=>{
//外部停止
let urlStop = 'http://127.0.0.1:49888/?action=pbottleRPA_stop'
fetch(urlStop)
},3000)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。