easygui icon indicating copy to clipboard operation
easygui copied to clipboard

Importing pywinauto changes the fileopenbox UI

Open breadcat-rr opened this issue 3 years ago • 8 comments

When importing pywinauto it makes the fileopenbox (and probably others, untested) a less usable and worse UI. e.g

import pywinauto
import easygui
easygui.fileopenbox()

Expected UI. Expected UI

The UI that is actually presented. pywinauto hijacked UI

breadcat-rr avatar Apr 15 '22 14:04 breadcat-rr

Strange - I can't reproduce this. Did something else change in between the before/after screenshots? If you comment out the pywinauto import do you still see the unexpected (light) dialog?

zadacka avatar Apr 23 '22 19:04 zadacka

For me at least, when I comment out pywinauto it shows back to the expected UI

breadcat-rr avatar Apr 24 '22 04:04 breadcat-rr

Hmm, what versions of easygui and pywinauto, and and which Windows OS are you using? I’ll have another shot at reproducing it..

On Sun, 24 Apr 2022 at 05:27, Breadcat @.***> wrote:

For me at least, when I comment out pywinauto it shows back to the expected UI

— Reply to this email directly, view it on GitHub https://github.com/robertlugg/easygui/issues/200#issuecomment-1107707045, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2XZIMT6KWDNLETYB2GSGLVGTESRANCNFSM5TQQTCLQ . You are receiving this because you commented.Message ID: @.***>

zadacka avatar Apr 24 '22 06:04 zadacka

easygui: Version: 0.98.2

pywinauto Version: 0.6.8

OS: Windows 10 Pro Version: 20H2 OS Build: 19042.1348

breadcat-rr avatar Apr 25 '22 04:04 breadcat-rr

Nope, my initial hypothesis seems totally wrong.

What is your tkinter version? Has it changed since installing and using pywinauto (or other dependencies)?

My default theme is 'light' (maybe using an older version of tk), and I haven't been able to find where it is set or default. I don't think that it is explicitly changed anywhere in easygui

zadacka avatar Apr 26 '22 22:04 zadacka

I'm using tkinter version 8.6. I don't think its changed at all because I never update my packages lol

breadcat-rr avatar Apr 27 '22 12:04 breadcat-rr

Maybe it's a bug of pywinauto, edit pywinauto/__init__.py line 83, change return com_init_mode to return 2, it should work.

hrpzcf avatar Sep 22 '22 17:09 hrpzcf

Yep, that works, Thanks!. Also found out that easygui.diropenbox() just hangs if pywinauto is unchanged.

breadcat-rr avatar Oct 12 '22 23:10 breadcat-rr