File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import comtypes .client
1010import comtypes .automation
1111import ctypes
12+ import winVersion
1213from hwPortUtils import SYSTEMTIME
1314import scriptHandler
1415from scriptHandler import script
@@ -99,6 +100,21 @@ def getSentMessageString(obj):
99100
100101class AppModule (appModuleHandler .AppModule ):
101102
103+ def isGoodUIAWindow (self , hwnd : int ) -> bool :
104+ windowClass = winUser .getClassName (hwnd )
105+ versionMajor = int (self .productVersion .split ('.' )[0 ])
106+ if (
107+ versionMajor >= 16
108+ and windowClass == "RICHEDIT60W"
109+ and winVersion .getWinVer () >= winVersion .WIN10
110+ ):
111+ # #12726: RICHEDIT60W In Outlook 2016+ on Windows 10+
112+ # has a very good UI Automation implementation,
113+ # Though oddly IsServerSideProvider returns false for these windows.
114+ # Examples: date picker in the Outlook Advanced search dialog
115+ return True
116+ return False
117+
102118 def __init__ (self ,* args ,** kwargs ):
103119 super (AppModule ,self ).__init__ (* args ,** kwargs )
104120 # Explicitly allow gainFocus events for the window class that hosts the active Outlook DatePicker cell
You can’t perform that action at this time.
0 commit comments