cr4n5 / XiaoYuanKouSuan

小猿口算_已达到0.00s
1.32k stars 169 forks source link

触摸无反应 #12

Open LiangyuCN opened 1 week ago

LiangyuCN commented 1 week ago

已经调整分辨率 cmd内可正常获取到答案 但没有自动填写答案操作

LiangyuCN commented 1 week ago

已连接到USB调试

top-player commented 1 week ago

同 可以获取到答案,改了分辨率还是不行 image

cr4n5 commented 1 week ago

其实最好还是更改一下坐标,测试的时候平板是横屏放置的,或者你可以用adb shell input swipe 手动测试一下,查看是否正常

saqy2 commented 1 week ago

其实最好还是更改一下坐标,测试的时候平板是横屏放置的,或者你可以用adb shell input swipe 手动测试一下,查看是否正常

与楼上同样的问题,也是可以获取到答案但是没有回答,请问大大如何根据自己的分辨率更改坐标啊

cr4n5 commented 1 week ago

开发者工具开启 指针位置 可以看到坐标

kanade521 commented 1 week ago

开发者工具开启 指针位置 可以看到坐标

改了分辨率 但是还是不会自动答题 adb测试触摸也没问题

cr4n5 commented 1 week ago

开发者工具开启 指针位置 可以看到坐标

改了分辨率 但是还是不会自动答题 adb测试触摸也没问题

获取到题目会弹出继续按钮 点击了吗

ZeroQing89 commented 1 week ago

开发者工具开启 指针位置 可以看到坐标

改了分辨率 但是还是不会自动答题 adb测试触摸也没问题

获取到题目会弹出继续按钮 点击了吗

点击了,但是没有反应

kanade521 commented 1 week ago

开发者工具开启 指针位置 可以看到坐标

改了分辨率 但是还是不会自动答题 adb测试触摸也没问题

获取到题目会弹出继续按钮 点击了吗

可以了

LiangyuCN commented 1 week ago

C:\Users\22506>adb shell corot:/ $ input swipe

Exception occurred while executing 'swipe': java.lang.IllegalArgumentException: Argument expected after "swipe" at com.android.modules.utils.BasicShellCommandHandler.getNextArgRequired(BasicShellCommandHandler.java:295) at com.android.server.input.InputShellCommand.sendSwipe(InputShellCommand.java:419) at com.android.server.input.InputShellCommand.runSwipe(InputShellCommand.java:414) at com.android.server.input.InputShellCommand.onCommand(InputShellCommand.java:257) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.input.InputManagerService.onShellCommand(InputManagerService.java:3442) at android.os.Binder.shellCommand(Binder.java:1075) at android.os.Binder.onTransact(Binder.java:895) at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:1372) at android.os.Binder.execTransactInternal(Binder.java:1351) at android.os.Binder.execTransact(Binder.java:1282)

LiangyuCN commented 1 week ago

我点击继续按钮还是不可以

saqy2 commented 1 week ago

image 设置了坐标,能够正确获取到题目,获取题目后有个gui窗口,点击继续后无反应,控制台抛出异常 报错如下: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\tkinter__init.py", line 1948, in call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 102, in on_button_click answer_write(answer) # 继续执行代码 ^^^^^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 46, in answer_write number_command.swipe_screen(answer[i]) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 18, in swipe_screen run_adb_command(all_commands) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 5, in run_adb_command shell_process = subprocess.Popen(["adb", "shell"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。

sd0ric4 commented 1 week ago

image 设置了坐标,能够正确获取到题目,获取题目后有个gui窗口,点击继续后无反应,控制台抛出异常 报错如下: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\tkinter__init.py", line 1948, in call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 102, in on_button_click answer_write(answer) # 继续执行代码 ^^^^^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 46, in answer_write number_command.swipe_screen(answer[i]) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 18, in swipe_screen run_adb_command(all_commands) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 5, in run_adb_command shell_process = subprocess.Popen(["adb", "shell"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。

请确保以下几点:

如果 ADB 已安装但未在系统的 PATH 中,可以修改代码,提供 ADB 可执行文件的完整路径。

top-player commented 1 week ago

image 设置了坐标,能够正确获取到题目,获取题目后有个gui窗口,点击继续后无反应,控制台抛出异常 报错如下: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\tkinterinit.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 102, in on_button_click answer_write(answer) # 继续执行代码 ^^^^^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 46, in answer_write number_command.swipe_screen(answer[i]) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 18, in swipe_screen run_adb_command(all_commands) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 5, in run_adb_command shell_process = subprocess.Popen(["adb", "shell"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。

请确保以下几点:

  • ADB(Android Debug Bridge)已安装。
  • 系统环境变量中已设置 ADB 的路径。可以通过命令行运行 adb version 来验证。

如果 ADB 已安装但未在系统的 PATH 中,可以修改代码,提供 ADB 可执行文件的完整路径。

image

添加路径后还是不行,gpt说是adb没有获取到root权限,要使用 su -c 'input swipe xy'

ZeroQing89 commented 1 week ago

image 设置了坐标,能够正确获取到题目,获取题目后有个gui窗口,点击继续后无反应,控制台抛出异常 报错如下: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\tkinterinit.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 102, in on_button_click answer_write(answer) # 继续执行代码 ^^^^^^^^^^^^^^^^^^^^ File "D:\study\py\XiaoYuanKouSuan\main.py", line 46, in answer_write number_command.swipe_screen(answer[i]) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 18, in swipe_screen run_adb_command(all_commands) File "D:\study\py\XiaoYuanKouSuan\number_command.py", line 5, in run_adb_command shell_process = subprocess.Popen(["adb", "shell"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\georg\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。

请确保以下几点:

  • ADB(Android Debug Bridge)已安装。
  • 系统环境变量中已设置 ADB 的路径。可以通过命令行运行 adb version 来验证。

如果 ADB 已安装但未在系统的 PATH 中,可以修改代码,提供 ADB 可执行文件的完整路径。

image

添加路径后还是不行,gpt说是adb没有获取到root权限,要使用 su -c 'input swipe xy'

一样的问题,完全没有办法