Before you start writing a script this week, settle on one job. Videos that are already exported need to go out on schedule, and that is a publish batch. Someone is live, and after they go off you need to be able to look up the viewer count and the comments, and that is livestream assist. The two jobs fail in different shapes, so write them separately.
| What this week delivers | Pick | What the script contains | What the script leaves out |
|---|---|---|---|
| Finished videos appear on the account on schedule | Publish batch | Find the publish entry, tap it, screenshot | Viewer count, comment record |
| After the stream ends, that session’’s screen can be looked up | Livestream assist | Capture the current livestream screen, and mark the session in the log | Publish entry, liking or speaking for the host |
Auto-likes, gift spam, and sending comments for the host are written into neither file.
If you picked a publish batch
Each phone is signed into only one account that will publish, and it stays inside that app. The script only finds the publish entry and leaves a result.
function main() {
if (!isServiceOk() && !startEnv()) {
logw("启动自动化返回 false");
return;
}
if (!isServiceOk()) {
logw("服务未就绪");
return;
}
let btn = label("发布").getOneNodeInfo(10000);
if (!btn) {
logw("没有发布入口");
image.captureFullScreen();
return;
}
clickPoint(btn.bounds.centerX(), btn.bounds.centerY());
sleep(1000);
image.captureFullScreen();
logd("已点发布并截图");
}
main();
10000 is milliseconds. If the entry copy is not the characters 「发布」, change it to the characters on the screen. With no node, it screenshots and stops. A person looks at the shot to see whether it stopped on an empty album, a signed-out account, or a button whose wording changed. The shot after the tap is for checking whether it entered the next step. Livestream viewer counts stay out of this function.
If you picked livestream assist
The phone stays on the livestream that is in progress. The script does not tap publish. It only keeps the screen.
function main() {
if (!isServiceOk() && !startEnv()) {
logw("启动自动化返回 false");
return;
}
if (!isServiceOk()) {
logw("服务未就绪");
return;
}
image.captureFullScreen();
logd("直播画面已截图");
}
main();
The person who comes in after the stream looks at the viewer count and the comment area in this shot. To keep more than one, run it again on the interval of your sessions. Each log line is still “直播画面已截图”. Match a session to a shot by the execution time. This file should not contain label("发布").
Both files call startEnv. If the same phone switches to USB HID, from EC iOS USB 10.7.0 (2026-09-08) it can run without a board, the system has to be iOS 17 or later, and it is mutually exclusive with “start automation.” That HID phone should not run the two files above. See the matching log line for the job you picked on one phone first, then put it on the other devices.
About EasyClick: A mobile automation script development platform covering three phone ecosystems: Android without root, iOS without jailbreak, and HarmonyOS. It also offers Apple script writing, Apple cluster control, Android cluster control, remote cloud control, and AI phone cluster control. → Explore all products
Ready to build it for real?
Every approach in this article can be built with EasyClick capabilities on iEasyClick — full documentation, developer tools and automation products, free to try.