Giter Site home page Giter Site logo

Comments (8)

Jinnrry avatar Jinnrry commented on July 28, 2024

复现步骤是怎么样的,你是横屏状态启动程序,然后竖屏运行?

目前所有点都是基于图像的,只要图像正确读取了,后续坐标就没问题。你可以用https://github.com/Jinnrry/RobotHelper/blob/master/Android/app/src/main/java/cn/xjiangwei/RobotHelper/Tools/ScreenCaptureUtil.java#L21 这个方法看一下图像是否正确获取了

from robothelper.

ChengZengRMIT avatar ChengZengRMIT commented on July 28, 2024

我运行的是阴阳师,从运行的时候就是横屏,获取图像之后是横屏的图像,然后识别图像给出的坐标也是按照横屏的坐标给的,我不确定是不是机型的问题,在执行点击command line的时候,我的机器始终是按照竖屏的屏幕坐标来触发的

from robothelper.

ChengZengRMIT avatar ChengZengRMIT commented on July 28, 2024

然后在tap方法里面,我发现我的手机获取到的点击事件的顺序和你写的不太一样,所以我自己做了调整,应该是不同的机型的问题

from robothelper.

Jinnrry avatar Jinnrry commented on July 28, 2024

额。你是用的root方式提权吗?root方式底层是直接操作的硬件指令,这个确实没有处理屏幕方向问题。你可以试试xposed方式,这种方式应该是没问题的。

root方式因为是操作的底层硬件,很容易出现机型问题,但是这方面我没条件也没精力去适配

from robothelper.

Cheng77777 avatar Cheng77777 commented on July 28, 2024

嗯,是的,我是用ROOT方式提取的,xposed框架对我手机上其他的app可能会有检测影响所以我没有尝试,不过没关系,各个机型可能会有不同的适配问题,手动解决也不复杂,有一定android开发基础就很容易定位问题解决

from robothelper.

Cheng77777 avatar Cheng77777 commented on July 28, 2024

然后现在的问题是在于我还没找到简单的办法停止脚本,每一次我都是要在app设置里强制结束,如果框架能够后续更新出暂停或者停止脚本那就挺完善的了

from robothelper.

Jinnrry avatar Jinnrry commented on July 28, 2024

https://github.com/Jinnrry/RobotHelper/blob/master/Android/app/src/main/java/cn/xjiangwei/RobotHelper/Service/RunTime.java#L173

项目的运行原理是点击开始后新起一个线程,在新线程中运行自定义脚本,因此你可以在这里向线程发送中断指令,你程序里面响应中断指令退出就行了

from robothelper.

Cheng77777 avatar Cheng77777 commented on July 28, 2024

嗯,我稍微做了一下修改,把Main改成实现Runnable,然后再RunTime class里实现了停止和重启脚本功能

from robothelper.

Related Issues (20)

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.