Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AutoLuaNew to Visual Studio Code? Get it now.
AutoLua

AutoLua

じ☆veつ错过的念

|
1 install
| (1) | Free
Android 自动化脚本开发工具 - Lua 脚本编辑、设备连接、脚本运行调试
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AutoLua VSCode 插件

Android 自动化脚本开发工具,支持 Lua 脚本编辑、设备连接、脚本运行调试。

👤 作者:じ☆veつ错过的念   |   💬 QQ:956466259   |   👥 QQ群:758965836


功能特性

  • 🔌 设备连接 - 通过 WiFi 连接 Android 设备
  • ▶️ 脚本运行 - 一键运行 Lua 脚本
  • 📝 代码补全 - 自动化 API 智能补全
  • 📷 截图工具 - 获取设备截图
  • 🎨 取色工具 - 屏幕取色
  • 🎯 坐标拾取 - 快速获取坐标
  • 🖼️ UI 设计器 - 可视化设计脚本界面
  • 📦 APK 打包 - 将脚本打包为独立 APK

快速开始

1. 安装服务端 APK

在 Android 设备上安装"AutoLua 服务端"APK,并启动服务。

2. 连接设备

  1. 确保电脑和手机在同一局域网
  2. 按 Ctrl+Shift+P 打开命令面板
  3. 输入"AutoLua: 连接设备"
  4. 输入手机显示的 IP 地址

3. 运行脚本

  1. 打开或创建 .lua 脚本文件
  2. 按 F5 运行脚本
  3. 按 Shift+F5 停止脚本

快捷键

快捷键 功能
F5 运行脚本
Shift+F5 停止脚本
Ctrl+Alt+C 连接设备
Ctrl+Alt+S 截图

API 参考

触控操作

tap(x, y)                           -- 点击
swipe(x1, y1, x2, y2, duration)     -- 滑动
longPress(x, y, duration)           -- 长按

图像识别

findImage(img, options)             -- 查找图片
findColor(color, options)           -- 查找颜色
screenshot()                        -- 截图
getPixelColor(x, y)                 -- 获取像素颜色

OCR 文字识别

ocrText(region)                     -- 识别文字
findText(text, options)             -- 查找文字

系统函数

sleep(ms)                           -- 等待
toast(msg)                          -- 显示提示
log(msg)                            -- 输出日志
getDeviceInfo()                     -- 获取设备信息
getScreenSize()                     -- 获取屏幕尺寸

示例脚本

-- 自动签到脚本
log("开始执行签到脚本")

-- 查找签到按钮
local pos = findImage("sign_btn.png", {threshold = 0.9})
if pos then
    tap(pos.x, pos.y)
    sleep(1000)
    toast("签到成功!")
else
    log("未找到签到按钮")
end
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft