Skip to content

Commit 518f510

Browse files
Merge 395462e into 12803e9
2 parents 12803e9 + 395462e commit 518f510

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

source/appModules/outlook.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import comtypes.client
1010
import comtypes.automation
1111
import ctypes
12+
import winVersion
1213
from hwPortUtils import SYSTEMTIME
1314
import scriptHandler
1415
from scriptHandler import script
@@ -99,6 +100,21 @@ def getSentMessageString(obj):
99100

100101
class 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

0 commit comments

Comments
 (0)