example: CallExternalScriptFunctions (#946)

This commit is contained in:
秋云
2025-05-28 17:46:05 +08:00
committed by GitHub
parent 7080347b22
commit f986a9605c
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
// 加载 utils 模块
eval(file.readTextSync("utils.js"));
(async function () {
utils.logInfo();
})();

View File

@@ -0,0 +1,12 @@
{
"manifestVersion": 1,
"name": "调用其他脚本函数",
"version": "1.0.0",
"description": "这是一个测试脚本,用于调用其他脚本中的函数。",
"authors": [
{
"name": "作者名"
}
],
"main": "main.js"
}

View File

@@ -0,0 +1,7 @@
function logInfo() {
log.info("你好我是一个utils模块的测试函数");
}
this.utils = {
logInfo
};