GithubHelp home page GithubHelp logo

batu1579 / hamibot-starter Goto Github PK

View Code? Open in Web Editor NEW
89.0 3.0 132.0 413 KB

一个快速开始用 TypeScript 编写 Hamibot 脚本的模板

License: Mozilla Public License 2.0

JavaScript 4.87% TypeScript 95.10% Batchfile 0.03%
autojs hamibot typescript

hamibot-starter's Issues

[Bug]模板使用 触摸操作模块 click函数返回参数类型不匹配

错误描述
touch-operation.d.ts 模块中 setScreenMetrics、click、longClick、press、swipe 函数均在说明中标注返回是否成功,其函数返回类型应该修改为boolean类型而不是使用void

错误复现
产生 Bug 的代码或要复现 Bug 需要进行的操作(这有助于尽快定位问题)。

行为预期
清晰而简明的描述一下你期望这段代码或进行的操作产生的结果。

截图
如果可以的话,添加截图来帮助解释您遇到的问题。

机器人型号(请填写以下信息):

  • 设备型号:[例如:红米 K40]
  • 操作系统:[例如:MIUI 12]
  • Hamibot 版本:[例如:1.2.0]

其他说明
任何有关该问题的其他说明。

使用预制函数异常

首先声明场景,我是首次使用hamibot-assistant vscode插件创建该项目的默认模板
疑惑的是当我注释掉init()方法上传运行后,下文的console.show()会生效,但恢复注释执行init()方法时,并不会有弹出log弹窗的调试效果。
介于我并不知道hamibot的网页IDE如何获取报错信息,想问问模板作者init函数中的代码是否有误或可否提供其他解决思路

问题已解决,是由于hamibot表单配置中显示控制台的表单项默认为undefined导致的异常捕获,从而使得下行代码无法运行以至于无法执行显示控制台的函数

[Bug]华为手机有些功能补兼容无法实现

错误描述
华为mate40鸿蒙4.0
toast,还有launch 都无法使用没有反应

错误复现
产生 Bug 的代码或要复现 Bug 需要进行的操作(这有助于尽快定位问题)。

还有怎么调用原生java api功能怎么实现

[QUESTION]

你遇到的问题
清晰而简洁的 描述一下你遇到的问题。
编译上传 运行 以后 日志里面报错 the ‘show console’ field in the configuration is invalid

[QUESTION]

fork这个仓库后直接打包还是会出现
The 'show console' field in the configuration is invaild
这个控制台检查是无法绕过的吗,我检查了我的config.json里面json数组第二个对象的"value"字段是true, 并且我的hamibot悬浮窗权限已经开始并可以正常使用hamibot悬浮球
如果不可绕过那我应该通过什么办法才能够正常运行脚本?

[Bug] 依赖更新问题

错误描述
npm install 安装后提示存在14个漏洞,使用npm audit fix 修复后无法正常编译

错误复现
git clone https://github.com/batu1579/hamibot-starter.git
npm install
npm audit fix

行为预期
可以正常运行

截图
image

机器人型号(请填写以下信息):

  • 设备型号:[例如:红米 K40]
  • 操作系统:[例如:MIUI 12]
  • Hamibot 版本:[例如:1.2.0]

其他说明
任何有关该问题的其他说明。

[Bug] 模板使用 ocr 代码参数类型不匹配

ocr.recognize(img); 会提示以下内容

Argument of type 'CaptureImage' is not assignable to parameter of type 'Image'.
Property 'recycle' is missing in type 'BaseImage' but required in type 'Image'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.