MCPcopy Create free account
hub / github.com/Mofangbao/midscene-pc / writeFile

Function writeFile

demo/write.file.ts:6–17  ·  view source on GitHub ↗
(pcService: IPCService)

Source from the content-addressed store, hash-verified

4import { IPCService } from "../src";
5
6export async function writeFile(pcService: IPCService) {
7 const pcDevice = new PCDevice({
8 pcService,
9 clickBeforeInput: true,
10 });
11 await pcDevice.launch();
12 const pcAgent = new PCAgent(pcDevice);
13 const res = await pcAgent.aiAsk(`使用浏览器搜索总结一下南京今天的天气`);
14 pcAgent.ai(
15 `${wechatInstruct}\n先点击底部任务栏,打开微信应用,然后找到'文件传输助手',发送以下天气信息:\n${res}`
16 );
17}

Callers

nothing calls this directly

Calls 1

launchMethod · 0.95

Tested by

no test coverage detected