用于无人值守的 MaaPiCli 运行监视脚本 #368
NEANC
started this conversation in
Show and tell
Replies: 2 comments
-
用 GPT AI 进一步扩写了一下;o1-preview,真好用(点头 Ps.总感觉gist的编辑有点难崩,应该是我打开方式不对( Caution 本项目使用 GPT AI 生成,GPT 模型:o1-preview 2RPM对指定进程进行监视,当进程在指定时间内未运行/进程运行超过指定时间/进程运行结束时使用 ServerChan 或 OnePush 库 进行推送上报的脚本/程序,使用 GPT AI 生成。 功能列表v2 版本现已支持:
License DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO. |
Beta Was this translation helpful? Give feedback.
0 replies
-
BAT 调用示例可用于 计划任务 或 直接调用,仅列出 MUMU 模拟器调用作为示例
本例编写初衷:为该 issues 提供一个更完善的解决方案: 适用于 2RPM-V2主 BAT 文件@echo off
chcp 65001 >nul
title M9A BAT运行调用
REM 赋值区
set "M9A=C:\M9A\MaaPiCli.exe"
set "RPMv2=C:\2RPM\v2\2RPM-V2.exe"
set "RPM-M9A=C:\2RPM\v2\M9A.yaml"
set "MuMuPlayer=C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe"
set "MuMuManager=C:\Program Files\Netease\MuMu Player 12\shell\MuMuManager.exe"
echo 正在关闭M9A
REM 执行kill
TASKKILL /f /fi "imagename eq MaaPiCli.exe"
echo 正在关闭模拟器
start "" "%MuMuManager%" api -v 模拟器编号 shutdown_player
echo 等待 10 秒
timeout /t 10 /nobreak >nul
echo 正在启动模拟器
start "" "%MuMuPlayer%" -v 模拟器编号
echo 等待 30 秒
timeout /t 30 /nobreak >nul
echo 模拟器已启动
echo 正在启动运行监视程序
start "" "%RPMv2%" -c "%RPM-M9A%"
echo 正在启动M9A
start "" "%M9A%" -d
echo M9A BAT调用运行流程结束
exit /b
配置文件设置
external_program_settings:
# 外部程序调用设置
enable_external_program_call: true
trigger_process_name: MaaPiCli.exe
external_program_path: C:\M9A\Kill-1999mumu.bat 子 BAT 文件@echo off
chcp 65001 >nul
title BAT 关闭模拟器
REM 赋值区
set "MuMuManager=C:\Program Files\Netease\MuMu Player 12\shell\MuMuManager.exe"
echo 正在关闭模拟器
start "" "%MuMuManager%" api -v 模拟器编号 shutdown_player
exit /b
适用于 2RPM-V1@echo off
chcp 65001 >nul
title M9A BAT运行调用
REM 赋值区
set "M9A=C:\M9A\MaaPiCli.exe"
set "RunningMonitoring=C:\M9A\MaaPiCli运行监视.exe"
set "MuMuPlayer=C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe"
set "MuMuManager=C:\Program Files\Netease\MuMu Player 12\shell\MuMuManager.exe"
echo 正在关闭M9A
REM 查询并列出
TASKLIST /FI "IMAGENAME eq MaaPiCli.exe"
REM 执行kill
TASKKILL /f /fi "imagename eq MaaPiCli.exe"
echo M9A已关闭
echo 正在关闭模拟器
start "" "%MuMuManager%" api -v 模拟器编号 shutdown_player
echo 等待 10 秒
timeout /t 10 /nobreak >nul
echo 正在启动模拟器
start "" "%MuMuPlayer%" -v 模拟器编号
echo 等待 30 秒
timeout /t 30 /nobreak >nul
echo 模拟器已启动
echo 正在启动 M9A
start "" "%M9A%" -d
echo M9A已启动
echo 正在运行 M9A 监视脚本
start "" "%RunningMonitoring%"
echo M9A监视脚本已启动
echo 本脚本正在退出
exit /b
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
用 GPT 生成了个 MaaPiCli 监视脚本,丢 gist 上了,有需要自取
https://gist.github.com/NEANC/ebd9fbec7d736dd16311047ba2cf5d9e
如何使用:
下载修改,测试运行,随后使用
pyinstaller
进行打包;然后用
任务计划
调用,或者 写个BAT脚本调用 M9A和监视脚本(BAT脚本可以排除其他MaaPiCli实例干扰并重启模拟器。)Beta Was this translation helpful? Give feedback.
All reactions