Invokes a menu item of a window.
WinMenuSelectItem ( "title", "text", "item" [, "item" [, "item" [, "item" [, "item" [, "item" [, "item"]]]]]] )
Parameters
title | The title of the window to read. |
text | The text of the window to read. |
item | Text of Menu Item |
item | [optional] Text of SubMenu item |
item | [optional] Text of SubMenu item |
item | [optional] Text of SubMenu item |
item | [optional] Text of SubMenu item |
item | [optional] Text of SubMenu item |
item | [optional] Text of SubMenu item |
Return Value
Success: | Returns 1. |
Failure: | Returns 0 if the menu could not be found. |
Remarks
You should note that underlined menu items actually contain a & character to indicate the underlining. Thus, the menu item File would actually require the text "&File", and Convert would require "Con&vert" You can access menu items up to six levels deep; and the window can be inactive, minimized, and/or even hidden.
Related
ControlCommand, Send
Example
; This will select File, Page Setup in notepad
WinMenuSelectItem("Untitled - ", "", "&File", "Page Set&up..." )