Microsoft KB Archive/93191: Difference between revisions
(importing KB archive) |
m (Text replacement - "&" to "&") |
||
Line 34: | Line 34: | ||
<pre>' This fails to activate the file menu or bring up the 'Open file' | <pre>' This fails to activate the file menu or bring up the 'Open file' | ||
' dialog box.</pre> | ' dialog box.</pre> | ||
WMenu "& | WMenu "&File" WMenu "&Open..." | ||
Pause "Click 'OK' to correctly activate the menu" | Pause "Click 'OK' to correctly activate the menu" | ||
Line 40: | Line 40: | ||
<pre>' To work around this problem, send the appropriate | <pre>' To work around this problem, send the appropriate | ||
' accelerator to activate any menu, then call WMenu.</pre> | ' accelerator to activate any menu, then call WMenu.</pre> | ||
DoKeys "%h" ' Pull down the Help menu. WMenu "& | DoKeys "%h" ' Pull down the Help menu. WMenu "&File" WMenu "&Open..." | ||
{| | {| |
Latest revision as of 13:18, 21 July 2020
Microsoft Knowledge Base
WMenu, XSelectMenuItem Routines Fail with Some Applications
Last reviewed: October 19, 1994
Article ID: Q93191
The information in this article applies to:
- Microsoft Test for Windows, version 1.0
SYMPTOMS
The WMenu or XSelectMenuItem routines in Microsoft Test may fail to activate the desired menu on some Windows applications. For example, WMenu does not work reliably on the Paintbrush application provided with Windows, version 3.1.
RESOLUTION
To work around this problem, you can first pull down one of the application's menus, either by sending the appropriate accelerator keystroke, or queuing a mouse click event that clicks the menu. Once any menu is active, the WMenu and XSelectMenuItem routines work reliably.
STATUS
Microsoft has confirmed this to be a bug in Microsoft Test version 1.0 for Windows. This bug was corrected in Microsoft Test version 2.0 for Windows.
MORE INFORMATION
The following example test script demonstrates both the problem and the workaround:
'$define TESTCTRL '$define TESTEVNT '$include: 'MSTEST.INC'
Run "PBRUSH.EXE", Nowait
' This fails to activate the file menu or bring up the 'Open file' ' dialog box.
WMenu "&File" WMenu "&Open..."
Pause "Click 'OK' to correctly activate the menu"
' To work around this problem, send the appropriate ' accelerator to activate any menu, then call WMenu.
DoKeys "%h" ' Pull down the Help menu. WMenu "&File" WMenu "&Open..."
Additional reference words: buglist1.00 fixlist2.00 1.00 buglist1.00 Last reviewed: October 19, 1994 |