yinkaisheng / Python-UIAutomation-for-Windows

🐍Python 3 wrapper of Microsoft UIAutomation. Support UIAutomation for MFC, WindowsForm, WPF, Modern UI(Metro UI), Qt, IE, Firefox, Chrome ...
Apache License 2.0
2.3k stars 462 forks source link

同时使用Python-UIAutomation-for-Windows和pyside6报错的问题 #262

Open diskay opened 8 months ago

diskay commented 8 months ago

报错为dpi相关,pyside6自己是更新级别的高dpi机制(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2),但是uiautomation里是直接SetProcessDpiAwareness(ProcessDpiAwareness.PerMonitorDpiAware)设置成了 DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE,建议弄个初始化什么的把那些代码一股脑扔进去,用开关去设置它,但是会有兼容问题,望作者决断

yinkaisheng commented 7 months ago

develop分支可以设置,master分支暂时不改。 https://github.com/yinkaisheng/Python-UIAutomation-for-Windows/blob/develop/demos/automation_calculator.py