推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
hyclew
V2EX  ›  Python

mac 下使用 pynput 在某些软件(chiaki)下无效

  •  
  •   hyclew · Jan 11, 2025 · 5341 views
    This topic created in 648 days ago, the information mentioned may be changed or developed.

    mac:2018 款 intel python:3.9 os:ventura 13.7.1 chiaki:2.2.0 ,ps 的远程游玩软件,软件本身也是有键盘监控,这个会和 pynput 冲突么?

    使用 pynupt 执行键盘模拟,通过 automator 配置服务、系统快捷键绑定脚本。代码如下,正常在编辑器里看执行是正常的,但是打开 chiaki ,快捷键调起脚本后就没反应了,但是如果多调用几次脚本会偶尔还会执行一次按键调用。不知道有没有大佬能指导下?

    或者还有其他推荐的自动化工具么?主要需求就是模拟键盘,可以获取图像进行分析比如获取像素点 rgb 或者用 opencv 做图像识别就更好了。

    import time from pynput.keyboard import Key, Controller keyboard = Controller() time1=0.1 for num in range(0,120): keyboard.tap("k"); time.sleep(time1); keyboard.tap(Key.left); time.sleep(time1); keyboard.tap("k"); time.sleep(time1); keyboard.tap(Key.down); time.sleep(time1);

    1 replies  •  2025-01-13 00:56:36 +08:00
    2280315050qgmail
        1
    2280315050qgmail  
       Jan 13, 2025
    模拟键盘有 https://github.com/taojy123/KeymouseGo ,支持录制
    pyautogui 的图像识别找不到图像,很不好用,有推荐的吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5840 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 01:42 · PVG 09:42 · LAX 18:42 · JFK 21:42
    ♥ Do have faith in what you're doing.