推荐学习书目
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
vtoexsir
V2EX  ›  Python

Python 怎么操控使用 Java 写的 pc 桌面软件的窗口?

  •  
  •   vtoexsir · Mar 14, 2019 · 3304 views
    This topic created in 2642 days ago, the information mentioned may be changed or developed.

    普通的 pc 桌面软件窗口,使用 pywinauto 到可以操控. 但是使用 java 写的桌面软件的窗口,pywinauto 不能操控. 请问 python 怎么才能操控 java 写的软件的窗口呢? 多谢!

    4 replies    2019-03-14 20:12:23 +08:00
    wellwisher
        1
    wellwisher  
       Mar 14, 2019   ❤️ 1
    用 pyautogui 试试。跑题一下下,可以考虑用 AutoHotKey,按键精灵之类的试试。
    ysc3839
        2
    ysc3839  
       Mar 14, 2019   ❤️ 1
    Windows 的话按 Win+Ctrl+Enter 打开讲述人,然后点击 Java 界面看看能不能识别里面的元素。能的话应该可以使用 pywinauto 的 uia 模式。
    hkitdog
        3
    hkitdog  
       Mar 14, 2019 via iPhone   ❤️ 1
    Swing 寫的嗎,做過類似項目,可以用這個插件获取窗口句柄
    http://www.dmwebsite.net
    vtoexsir
        4
    vtoexsir  
    OP
       Mar 14, 2019
    @ysc3839 有效,但不能取到所有子窗口
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   920 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 19:00 · PVG 03:00 · LAX 12:00 · JFK 15:00
    ♥ Do have faith in what you're doing.