46 Star 364 Fork 64

LEO/ 小瓶RPA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
[企业版]外部控制能力.js 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
LEO 提交于 2024-12-21 10:01 . delaySet
/**
* 小瓶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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/pbottle/pbottle-rpa.git
[email protected]:pbottle/pbottle-rpa.git
pbottle
pbottle-rpa
小瓶RPA
master

搜索帮助