From d4bf54289c3bfb20c53f55c190fe5902813dcb63 Mon Sep 17 00:00:00 2001 From: markm Date: Sat, 18 Mar 2006 08:56:46 +0000 Subject: [PATCH] Possible future change for BY_POSITION menu items --- pywinauto/controls/menuwrapper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pywinauto/controls/menuwrapper.py b/pywinauto/controls/menuwrapper.py index 4b021e8..d6e00fe 100644 --- a/pywinauto/controls/menuwrapper.py +++ b/pywinauto/controls/menuwrapper.py @@ -230,6 +230,12 @@ class MenuItem(object): "MenuItem '%s' is disabled"% self.Text()) from HwndWrapper import delay_after_menuselect + + #if self.State() & win32defines.MF_BYPOSITION: + # print self.Text(), "BYPOSITION" + # self.ctrl.NotifyMenuSelect(self.Index(), True) + #else: + self.ctrl.NotifyMenuSelect(self.ID()) win32functions.WaitGuiThreadIdle(self.ctrl) time.sleep(delay_after_menuselect)