瀏覽代碼

x64打包完美

yichael 2 月之前
父節點
當前提交
9ae9def9dc
共有 25 個文件被更改,包括 493 次插入43 次删除
  1. 13 5
      nodejs/ef-compiler/actions/adb/send-img-to-device.js
  2. 28 10
      nodejs/ef-compiler/actions/fun/img-center-point-location.js
  3. 25 6
      package/x64/package-x64.js
  4. 0 1
      package/x64/static/device_list.json
  5. 200 0
      package/x64/static/process/GenerateNote/bp.json
  6. 204 0
      package/x64/static/process/GenerateNote/process.json
  7. 1 0
      package/x64/static/process/GenerateNote/readme.md
  8. 二進制
      package/x64/static/process/GenerateNote/resources/Matched-娣诲姞绗旇.png
  9. 二進制
      package/x64/static/process/GenerateNote/resources/Matched-閫変腑鍥剧墖.png
  10. 二進制
      package/x64/static/process/GenerateNote/resources/Screenshot-添加笔记.png
  11. 二進制
      package/x64/static/process/GenerateNote/resources/Screenshot-选中图片.png
  12. 二進制
      package/x64/static/process/GenerateNote/resources/添加笔记.png
  13. 二進制
      package/x64/static/process/GenerateNote/resources/选中图片.png
  14. 二進制
      package/x64/static/process/GenerateNote/resources/选择图片.png
  15. 2 2
      package/x64/static/process/RedNoteAIThumbsUp/process.json
  16. 二進制
      package/x64/static/process/RedNoteAIThumbsUp/resources/Matched-瑙嗛鐐硅禐.png
  17. 二進制
      package/x64/static/process/RedNoteAIThumbsUp/resources/Screenshot-视频点赞.png
  18. 18 17
      package/x64/static/process/RedNoteBrowsingAndThumbsUp/process.json
  19. 二進制
      package/x64/static/process/RedNoteBrowsingAndThumbsUp/resources/Matched-瑙嗛鐐硅禐.png
  20. 二進制
      package/x64/static/process/RedNoteBrowsingAndThumbsUp/resources/Screenshot-视频点赞.png
  21. 2 2
      static/process/RedNoteAIThumbsUp/process.json
  22. 二進制
      static/process/RedNoteAIThumbsUp/resources/Matched-瑙嗛鐐硅禐.png
  23. 二進制
      static/process/RedNoteAIThumbsUp/resources/Screenshot-视频点赞.png
  24. 二進制
      static/process/RedNoteBrowsingAndThumbsUp/resources/Matched-瑙嗛鐐硅禐.png
  25. 二進制
      static/process/RedNoteBrowsingAndThumbsUp/resources/Screenshot-视频点赞.png

+ 13 - 5
nodejs/ef-compiler/actions/adb/send-img-to-device.js

@@ -6,9 +6,12 @@ const { spawnSync } = require('child_process')
 const path = require('path')
 const fs = require('fs')
 
-const projectRoot = path.resolve(__dirname, '..', '..', '..', '..')
-const configPath = path.join(projectRoot, 'configs', 'config.js')
+const defaultRoot = path.resolve(__dirname, '..', '..', '..', '..')
+const configPath = process.env.STATIC_ROOT
+  ? path.join(path.dirname(process.env.STATIC_ROOT), 'configs', 'config.js')
+  : path.join(defaultRoot, 'configs', 'config.js')
 const config = fs.existsSync(configPath) ? require(configPath) : {}
+const projectRoot = (config.projectRoot && fs.existsSync(config.projectRoot)) ? config.projectRoot : defaultRoot
 const adbPath = config.adbPath?.path
   ? (path.isAbsolute(config.adbPath.path) ? config.adbPath.path : path.resolve(projectRoot, config.adbPath.path))
   : path.join(projectRoot, 'lib', 'scrcpy-adb', process.platform === 'win32' ? 'adb.exe' : 'adb')
@@ -33,9 +36,14 @@ function doSendImageToDevice(localPath, deviceId, adbExe = adbPath) {
   const deviceFile = DEVICE_PICTURES + basename
   const localForAdb = resolved.replace(/\\/g, '/')
   const args = deviceId ? ['-s', deviceId, 'push', localForAdb, deviceFile] : ['push', localForAdb, deviceFile]
-  const push = spawnSync(adbExe, args, { encoding: 'utf-8', timeout: 30000 })
-  if (push.status !== 0) {
-    const err = (push.stderr || push.stdout || '').trim() || `adb push 退出码 ${push.status}`
+  const push = spawnSync(adbExe, args, { encoding: 'utf-8', timeout: 60000 })
+  const ok = push.status === 0
+  if (!ok) {
+    const msg = (push.stderr || push.stdout || '').trim()
+    const code = push.status
+    const sig = push.signal
+    let err = msg || (code != null ? `adb push 退出码 ${code}` : sig ? `adb push 被终止 (${sig})` : 'adb push 未正常结束(可能超时或 adb 未找到)')
+    if (code == null && !msg) err += '。请检查设备连接与 adb 路径'
     return { success: false, error: err }
   }
   // Android 10/11+ 需带 --receiver-include-background 扫描才易在相册中显示

+ 28 - 10
nodejs/ef-compiler/actions/fun/img-center-point-location.js

@@ -11,8 +11,11 @@ const { spawnSync } = require('child_process')
 const configPath = process.env.STATIC_ROOT
   ? path.join(path.dirname(process.env.STATIC_ROOT), 'configs', 'config.js')
   : path.join(__dirname, '..', '..', '..', '..', 'configs', 'config.js')
-const projectRoot = path.dirname(path.dirname(path.resolve(configPath)))
 const config = fs.existsSync(configPath) ? require(configPath) : {}
+// 打包后优先使用 config.projectRoot(如 package/x64/config.js 中的配置),否则按路径推导
+const projectRoot = (config.projectRoot && fs.existsSync(config.projectRoot))
+  ? config.projectRoot
+  : path.dirname(path.dirname(path.resolve(configPath)))
 const imageMatchScriptPath = path.join(projectRoot, 'python', 'scripts', 'image-match.py')
 
 const tagName = 'img-center-point-location'
@@ -23,7 +26,7 @@ const schema = {
   outputs: { variable: '中心点坐标(JSON 字符串格式,如:{"x":123,"y":456})' },
 }
 
-/** 解析 Python 可执行路径(与 config 中 pythonPath / pythonVenvPath 一致) */
+/** 解析 Python 可执行路径(与 config 中 pythonPath / pythonVenvPath 一致)。优先用 env(venv)以包含 opencv/numpy 等依赖。 */
 function getPythonPath() {
   const base = config.pythonPath?.path || config.pythonVenvPath || path.join(projectRoot, 'python', process.arch === 'arm64' ? 'arm64' : 'x64')
   const envPy = path.join(base, 'env', 'Scripts', 'python.exe')
@@ -43,6 +46,7 @@ function matchImageAndGetCoordinate(device, imagePath, scaleRange, centerRatio)
   const maxScale = Number(scaleRange[1])
   if (Number.isNaN(minScale) || Number.isNaN(maxScale) || minScale >= maxScale) return { success: false, error: '缩放比范围无效,需为两个数字且 min < max' }
   const templatePath = path.isAbsolute(imagePath) ? imagePath : path.resolve(projectRoot, imagePath)
+  if (!fs.existsSync(templatePath)) return { success: false, error: `模板文件不存在: ${templatePath}` }
   const ts = Date.now()
   const templateDir = path.dirname(templatePath)
   const templateBase = path.basename(templatePath, path.extname(templatePath))
@@ -67,17 +71,31 @@ function matchImageAndGetCoordinate(device, imagePath, scaleRange, centerRatio)
     if (ratio < 1) args.push('--center-ratio', String(ratio))
   }
   if (hasCrop) args.push('--template-output', templatePath.replace(/\\/g, '/'))
-  const r = spawnSync(pythonPath, args, {
-    encoding: 'utf-8',
-    timeout: 20000,
-    env: { ...process.env, PYTHONIOENCODING: 'utf-8' },
-    cwd: projectRoot
-  })
+  const env = { ...process.env, PYTHONIOENCODING: 'utf-8' }
+  if (process.platform === 'win32') {
+    const pyDir = path.dirname(pythonPath)
+    const pyRoot = path.dirname(path.dirname(pyDir))
+    env.PATH = [pyDir, pyRoot, process.env.PATH].filter(Boolean).join(path.delimiter)
+  }
+  const spawnOpts = { encoding: 'utf-8', timeout: 20000, env, cwd: projectRoot }
+  const r = spawnSync(pythonPath, args, spawnOpts)
   try { fs.unlinkSync(templateCopyPath) } catch (_) {}
   // 截图保留在模板同级目录(Screenshot-pic0.png 等),便于排查匹配失败原因
 
-  if (r.status !== 0) return { success: false, error: (r.stderr || r.stdout || '').trim() || '图像匹配失败' }
-  const out = JSON.parse(r.stdout.trim())
+  if (r.status !== 0) {
+    const msg = [r.stderr, r.stdout].filter(Boolean).map(s => String(s).trim()).join('\n') || '图像匹配失败'
+    const extra = r.signal ? ` [signal: ${r.signal}]` : (r.error ? ` [${r.error.message}]` : '')
+    const scriptExists = fs.existsSync(imageMatchScriptPath)
+    const pyExists = fs.existsSync(pythonPath)
+    const diag = ` | projectRoot=${projectRoot} script存在=${scriptExists} python存在=${pyExists} status=${r.status}`
+    return { success: false, error: msg + extra + diag }
+  }
+  let out
+  try {
+    out = JSON.parse(r.stdout.trim())
+  } catch (e) {
+    return { success: false, error: `脚本输出非 JSON: ${(r.stdout || r.stderr || '').slice(0, 200)}` }
+  }
   if (!out.success) return { success: false, error: out.error || '未找到图片' }
   return {
     success: true,

+ 25 - 6
package/x64/package-x64.js

@@ -71,7 +71,7 @@ function getUnpackedElectronDir() {
 
 /** 与 @electron/get 的 Cache.getCacheDirectory 一致:用 URL 目录部分的 sha256 作为缓存子目录 */
 function getElectronCacheSubdir(version) {
-  const base = ELECTRON_MIRROR.replace(/\/$/, '')
+  const base = (ELECTRON_MIRROR || 'https://github.com/electron/electron/releases/download').replace(/\/$/, '')
   const strippedUrl = `${base}/v${version}`
   return crypto.createHash('sha256').update(strippedUrl).digest('hex')
 }
@@ -306,18 +306,36 @@ async function main() {
         console.warn('[3/3] 复制 static 失败:', e.message)
       }
     }
-    // Python 整个目录拷贝到 win-unpacked/python/(含 scripts、x64),供 image-match.py、img-crop.py 等使用
+    // Python 整个目录拷贝到 win-unpacked/python/(含 scripts、x64、虚拟环境 x64/env)。用 robocopy 避免路径超长(260)静默失败
     const pythonSrcRoot = path.join(projectRoot, 'python')
     const pythonDestRoot = path.join(unpackedDir, 'python')
     if (fs.existsSync(pythonSrcRoot) && fs.statSync(pythonSrcRoot).isDirectory()) {
       try {
         if (!fs.existsSync(pythonDestRoot)) fs.mkdirSync(pythonDestRoot, { recursive: true })
         if (process.platform === 'win32') {
-          cp.execSync(`xcopy /E /I /Y "${pythonSrcRoot}\\*" "${pythonDestRoot}"`, { stdio: 'ignore' })
+          // robocopy 支持长路径,/E 含子目录,虚拟环境 env 会一并复制
+          const rc = cp.spawnSync('robocopy', [
+            pythonSrcRoot,
+            pythonDestRoot,
+            '/E', '/R:1', '/W:1', '/NFL', '/NDL', '/NJH', '/NJS'
+          ], { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'] })
+          const exitCode = rc.status
+          if (exitCode >= 8) {
+            const err = (rc.stderr || rc.stdout || '').trim()
+            throw new Error(`robocopy 退出码 ${exitCode}${err ? ': ' + err : ''}`)
+          }
         } else {
-          cp.execSync(`cp -R "${pythonSrcRoot}"/* "${pythonDestRoot}"`, { stdio: 'ignore' })
+          cp.execSync(`cp -R "${pythonSrcRoot}"/* "${pythonDestRoot}"`, { stdio: 'inherit' })
+        }
+        console.log('[3/3] 已打包 python(含 scripts、x64、虚拟环境 env)→ ' + X64_UNPACKED_DIR + '/python/')
+        const x64EnvPy = path.join(unpackedDir, 'python', 'x64', 'env', 'Scripts', 'python.exe')
+        const x64Py = path.join(unpackedDir, 'python', 'x64', 'py', 'python.exe')
+        if (!fs.existsSync(x64EnvPy)) {
+          console.warn('[3/3] 警告: 未找到 python/x64/env(虚拟环境),image-match 需 opencv,请确保源码下 python/x64/env 存在并已安装依赖后重新打包')
+        }
+        if (!fs.existsSync(x64Py) && !fs.existsSync(x64EnvPy)) {
+          console.warn('[3/3] 警告: 打包后未找到 python.exe(请检查 python/x64/env/Scripts 或 python/x64/py 是否已复制)')
         }
-        console.log('[3/3] 已打包 python(含 scripts、x64)→ ' + X64_UNPACKED_DIR + '/python/')
       } catch (e) {
         console.warn('[3/3] 复制 python 失败:', e.message)
       }
@@ -332,13 +350,14 @@ const pythonDir = 'x64'
 const pythonVenvPath = path.join(projectRoot, 'python', pythonDir, 'env')
 
 module.exports = {
+  projectRoot,
   window: { width: 800, height: 600, autoHideMenuBar: true },
   devTools: { enabled: false },
   vite: { port: 9527, host: 'localhost' },
   pythonPath: { path: path.join(projectRoot, 'python', pythonDir) },
   pythonVenvPath,
   adbPath: { path: path.join(projectRoot, 'scrcpy-adb', process.platform === 'win32' ? 'adb.exe' : 'adb') },
-  nodejsPath: 'node/' + (process.platform === 'win32' ? 'node.exe' : 'node')
+  nodejsPath: path.join(projectRoot, 'node', process.platform === 'win32' ? 'node.exe' : 'node')
 }
 `
       try {

+ 0 - 1
package/x64/static/device_list.json

@@ -1,5 +1,4 @@
 {
   "devices": [
-    "192.168.0.107"
   ]
 }

+ 200 - 0
package/x64/static/process/GenerateNote/bp.json

@@ -0,0 +1,200 @@
+{
+	"nodePositions": {
+		"node_begin_1768681618551": {
+			"x": 150,
+			"y": 100
+		},
+		"node_0": {
+			"x": 150,
+			"y": 300
+		},
+		"node_1": {
+			"x": 470,
+			"y": 100
+		},
+		"node_2": {
+			"x": 470,
+			"y": 300
+		},
+		"node_3": {
+			"x": 470,
+			"y": 500
+		},
+		"node_4": {
+			"x": 470,
+			"y": 700
+		},
+		"node_5": {
+			"x": 470,
+			"y": 900
+		},
+		"node_6": {
+			"x": 470,
+			"y": 1100
+		},
+		"node_7": {
+			"x": 470,
+			"y": 1300
+		},
+		"node_8": {
+			"x": 470,
+			"y": 1500
+		},
+		"node_9": {
+			"x": 470,
+			"y": 1700
+		},
+		"node_10": {
+			"x": 150,
+			"y": 1900
+		},
+		"node_11": {
+			"x": 790,
+			"y": 100
+		},
+		"node_12": {
+			"x": 790,
+			"y": 300
+		},
+		"node_13": {
+			"x": 150,
+			"y": 2100
+		},
+		"node_14": {
+			"x": 150,
+			"y": 2300
+		},
+		"node_15": {
+			"x": 150,
+			"y": 2500
+		},
+		"node_16": {
+			"x": 150,
+			"y": 2700
+		},
+		"node_17": {
+			"x": 150,
+			"y": 2900
+		},
+		"node_18": {
+			"x": 150,
+			"y": 3100
+		},
+		"node_19": {
+			"x": 150,
+			"y": 3300
+		},
+		"node_20": {
+			"x": 150,
+			"y": 500
+		},
+		"node_21": {
+			"x": 150,
+			"y": 700
+		},
+		"node_22": {
+			"x": 150,
+			"y": 900
+		},
+		"node_23": {
+			"x": 1110,
+			"y": 100
+		},
+		"node_24": {
+			"x": 1110,
+			"y": 300
+		},
+		"node_25": {
+			"x": 1430,
+			"y": 100
+		},
+		"node_26": {
+			"x": 1430,
+			"y": 300
+		},
+		"node_27": {
+			"x": 790,
+			"y": 500
+		},
+		"node_28": {
+			"x": 790,
+			"y": 700
+		},
+		"node_29": {
+			"x": 790,
+			"y": 900
+		},
+		"node_30": {
+			"x": 150,
+			"y": 1100
+		},
+		"node_31": {
+			"x": 150,
+			"y": 1300
+		},
+		"node_32": {
+			"x": 150,
+			"y": 1500
+		},
+		"node_33": {
+			"x": 150,
+			"y": 1700
+		},
+		"var_turn_1768681618551": {
+			"x": 50,
+			"y": 200
+		},
+		"var_relationBg_1768681618551": {
+			"x": 50,
+			"y": 320
+		},
+		"var_chatArea_1768681618551": {
+			"x": 50,
+			"y": 440
+		},
+		"var_chatHistoryMessage_1768681618551": {
+			"x": 50,
+			"y": 560
+		},
+		"var_currentChatMessage_1768681618551": {
+			"x": 50,
+			"y": 680
+		},
+		"var_lastHistoryMessage_1768681618551": {
+			"x": 50,
+			"y": 800
+		},
+		"var_lastChatMessage_1768681618551": {
+			"x": 50,
+			"y": 920
+		},
+		"var_lastChatRole_1768681618551": {
+			"x": 50,
+			"y": 1040
+		},
+		"var_lastHistoryChatMessage_1768681618551": {
+			"x": 50,
+			"y": 1160
+		},
+		"var_lastHistoryChatRole_1768681618551": {
+			"x": 50,
+			"y": 1280
+		},
+		"var_aiReply_1768681618551": {
+			"x": 50,
+			"y": 1400
+		},
+		"var_aiCallBack_1768681618551": {
+			"x": 50,
+			"y": 1520
+		},
+		"var_sendBtnPos_1768681618551": {
+			"x": 50,
+			"y": 1640
+		},
+		"var_newChatMessage_1768681618551": {
+			"x": 50,
+			"y": 1760
+		}
+	}
+}

+ 204 - 0
package/x64/static/process/GenerateNote/process.json

@@ -0,0 +1,204 @@
+{
+  "name": "GenerateNote",
+  "description": "生成小红书图文笔记",
+  "variables": 
+  {
+    "pos": "",
+    "article-prompt": "健康减脂:科学饮食与运动习惯,适合做小红书笔记",
+    "article": "",
+    "img-prompt-json": "",
+    "img-prompt-arr": [],
+    "img-prompt": ""
+  },
+  "execute": [
+    {
+      "type": "echo",
+      "inVars": ["开始生成小红书图文笔记"]
+    },
+    {
+      "type": "ai",
+      "method": "text2text",
+      "inVars": ["根据以下主题写一篇小红书风格的图文稿件,要求:长文,至少 500 字,分段清晰、吸引人、适当使用 emoji、适合发笔记。只输出稿件正文,不要标题。主题:{{article-prompt}}", ""],
+      "outVars": ["{article}"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["开始生成小红书配图 prompt"]
+    },
+    {
+      "type": "ai",
+      "method": "text2text",
+      "inVars": ["根据:{article}的内容,为配图给出两个图片的 prompt(简短关键词或短语,用于搜图),不要 URL。只输出一个 JSON 数组,两个字符串,不要任何说明和 markdown。示例格式:[\"健康饮食 沙拉\",\"运动 瑜伽\"]"],
+      "outVars": ["{img-prompt-json}"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["{img-prompt-json}"]
+    },
+    {
+      "type": "json",
+      "method": "json-to-arr",
+      "inVars": ["{img-prompt-json}"],
+      "outVars": ["{img-prompt-arr}"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["{img-prompt-arr}[0]"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["开始下载配图"]
+    },
+    {
+      "type": "for",
+      "indexVariable": "{idx}",
+      "array": "{img-prompt-arr}",
+      "body": 
+      [
+        {
+          "type": "try",
+          "try": 
+          [
+            {
+              "type": "download-img",
+              "inVars": ["{img-prompt-arr}[{idx}]", "tmp/pic{idx}.png"],
+              "outVars": []
+            }
+          ],
+          "fail": 
+          [
+            {
+              "type": "ai",
+              "method": "text2text",
+              "inVars": ["根据:{article}的内容,为配图给出一个图片的 prompt(简短关键词或短语),不要 URL、不要 JSON、不要引号,只输出一个 prompt。"],
+              "outVars": ["{img-prompt}"]
+            },
+            {
+              "type": "download-img",
+              "inVars": ["{img-prompt}", "tmp/pic{idx}.png"],
+              "outVars": []
+            }
+          ]
+        },
+        {
+          "type": "echo",
+          "inVars": ["pic{idx}.png 下载成功"]
+        },
+        {
+          "type": "adb",
+          "method": "send-img-to-device",
+          "inVars": ["tmp/pic{idx}.png"],
+          "outVars": []
+        }
+      ]
+    },
+    {
+      "type": "echo",
+      "inVars": ["开始添加笔记"]
+    },
+    {
+      "type": "img-center-point-location",
+      "inVars": ["添加笔记.png", [0.2, 1.6]],
+      "outVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "click",
+      "inVars": ["{pos}"]
+    },
+    {
+      "type": "ocr",
+      "inVars": ["从相册选择"],
+      "outVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "click",
+      "inVars": ["{pos}"]
+    },
+    {
+      "type": "for",
+      "indexVariable": "{idx}",
+      "array": "{img-prompt-arr}",
+      "body": [
+        {
+          "type": "echo",
+          "inVars": ["开始先择配图pic{idx}.png"]
+        },
+        {
+          "type": "img-center-point-location",
+          "inVars": ["tmp/pic{idx}.png", [0.1, 2.0], [0.8, "w"]],
+          "outVars": ["{pos}"]
+        },
+        {
+          "type": "adb",
+          "method": "click",
+          "inVars": ["{pos}"]
+        },
+        {
+          "type": "img-center-point-location",
+          "inVars": ["选中图片.png", [0.2, 1.6]],
+          "outVars": ["{pos}"]
+        },
+        {
+          "type": "adb",
+          "method": "click",
+          "inVars": ["{pos}"]
+        },
+        {
+          "type": "adb",
+          "method": "keyevent",
+          "inVars": ["4"],
+          "outVars": []
+        }
+      ]
+    },
+    {
+      "type": "ocr",
+      "inVars": ["下一步"],
+      "outVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "click",
+      "inVars": ["{pos}"]
+    },
+    {
+      "type": "ocr",
+      "inVars": ["下一步"],
+      "outVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "click",
+      "inVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "input",
+      "inVars": ["{article}"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["开始查找并点击发布"]
+    },
+    {
+      "type": "ocr",
+      "inVars": ["发布"],
+      "outVars": ["{pos}"]
+    },
+    {
+      "type": "adb",
+      "method": "click",
+      "inVars": ["{pos}"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["已点击发布"]
+    },
+    {
+      "type": "echo",
+      "inVars": ["流程结束"]
+    }
+  ]
+}

+ 1 - 0
package/x64/static/process/GenerateNote/readme.md

@@ -0,0 +1 @@
+生成小红书图文笔记

二進制
package/x64/static/process/GenerateNote/resources/Matched-娣诲姞绗旇.png


二進制
package/x64/static/process/GenerateNote/resources/Matched-閫変腑鍥剧墖.png


二進制
package/x64/static/process/GenerateNote/resources/Screenshot-添加笔记.png


二進制
package/x64/static/process/GenerateNote/resources/Screenshot-选中图片.png


二進制
package/x64/static/process/GenerateNote/resources/添加笔记.png


二進制
package/x64/static/process/GenerateNote/resources/选中图片.png


二進制
package/x64/static/process/GenerateNote/resources/选择图片.png


+ 2 - 2
package/x64/static/process/RedNoteAIThumbsUp/process.json

@@ -10,7 +10,7 @@
 	    [
         {
           "type": "img-center-point-location",
-          "inVars": ["视频点赞.png"],
+          "inVars": ["视频点赞.png", [0.2, 1.6]],
           "outVars": ["{sendBtnPos}"]
         }
       ],
@@ -22,7 +22,7 @@
 	    [
         {
 			    "type": "img-center-point-location",
-			    "inVars": ["图文点赞.png"],
+			    "inVars": ["图文点赞.png", [0.2, 1.6]],
 			    "outVars": ["{sendBtnPos}"]
 		    }
       ]

二進制
package/x64/static/process/RedNoteAIThumbsUp/resources/Matched-瑙嗛鐐硅禐.png


二進制
package/x64/static/process/RedNoteAIThumbsUp/resources/Screenshot-视频点赞.png


+ 18 - 17
package/x64/static/process/RedNoteBrowsingAndThumbsUp/process.json

@@ -2,14 +2,15 @@
 	"name": "RedNoteBrowsingAndThumbsUp",
         "description": "小红书随机浏览和点赞",
 	"variables": {
-		"page-index":0,
-		"up-or-down":0,
-		"swipe-count":0,
-		"click-x":0,
-		"click-y":0,
-		"random-click-pos":"",
-		"stay-duration":0,
-		"send-btn-pos": ""
+		"page-index": 0,
+		"up-or-down": 0,
+		"swipe-count": 0,
+		"click-x": 0,
+		"click-y": 0,
+		"random-click-pos": "",
+		"stay-duration": 0,
+		"send-btn-pos": "",
+		"b-like-click": 0
 	},
 	"execute": 
 	[
@@ -21,14 +22,14 @@
 				{
 					"type": "random",
 					"inVars": ["1", "3"],
-					"outVars": ["{swipeCount}"]
+					"outVars": ["{swipe-count}"]
 				},
 				{
 					"type": "schedule",
 					"condition": 
 					{
 						"interval": "7s",
-						"repeat": "{swipeCount}"
+						"repeat": "{swipe-count}"
 					},
 					"interval": 
 					[
@@ -43,17 +44,17 @@
 				{
 					"type": "random",
 					"inVars": ["200", "780"],
-					"outVars": ["{clickX}"]
+					"outVars": ["{click-x}"]
 				},
 				{
 					"type": "random",
-					"inVars": ["400", "2000"],
-					"outVars": ["{clickY}"]
+					"inVars": ["400", "1500"],
+					"outVars": ["{click-y}"]
 				},
 				{
 					"type": "set",
 					"variable": "{random-click-pos}",
-					"value": "{clickX},{clickY}"
+					"value": "{click-x},{click-y}"
 				},
 				{
 					
@@ -72,7 +73,7 @@
 					[
 						{
 							"type": "img-center-point-location",
-							"inVars": ["视频点赞.png"],
+							"inVars": ["视频点赞.png", [0.2, 1.6]],
 							"outVars": ["{send-btn-pos}"]
 						}
 					],
@@ -81,11 +82,11 @@
 						{
 							"type": "random",
 							"inVars": ["2", "10"],
-							"outVars": ["{swipeCount}"]
+							"outVars": ["{swipe-count}"]
 						},
 						{
 							"type": "for",
-							"times": "{swipeCount}",
+							"times": "{swipe-count}",
 							"variable": "{i}",
 							"body": 
 							[

二進制
package/x64/static/process/RedNoteBrowsingAndThumbsUp/resources/Matched-瑙嗛鐐硅禐.png


二進制
package/x64/static/process/RedNoteBrowsingAndThumbsUp/resources/Screenshot-视频点赞.png


+ 2 - 2
static/process/RedNoteAIThumbsUp/process.json

@@ -10,7 +10,7 @@
 	    [
         {
           "type": "img-center-point-location",
-          "inVars": ["视频点赞.png"],
+          "inVars": ["视频点赞.png", [0.2, 1.6]],
           "outVars": ["{sendBtnPos}"]
         }
       ],
@@ -22,7 +22,7 @@
 	    [
         {
 			    "type": "img-center-point-location",
-			    "inVars": ["图文点赞.png"],
+			    "inVars": ["图文点赞.png", [0.2, 1.6]],
 			    "outVars": ["{sendBtnPos}"]
 		    }
       ]

二進制
static/process/RedNoteAIThumbsUp/resources/Matched-瑙嗛鐐硅禐.png


二進制
static/process/RedNoteAIThumbsUp/resources/Screenshot-视频点赞.png


二進制
static/process/RedNoteBrowsingAndThumbsUp/resources/Matched-瑙嗛鐐硅禐.png


二進制
static/process/RedNoteBrowsingAndThumbsUp/resources/Screenshot-视频点赞.png