jrubino
asked on
Extracting Menu Array from an Application
My goal is to produce training that includes simulated menus from a variety of applications (Word, Excel, Dreamweaver, etc.). Part of the procedure for creating the training will be to come up with a list of sub- and sub-sub menu under each of the applications top-level menus. For example, for the menus in IE, I need a text file with info something like this:
File
New
Window
<divider>
Message
Post
Open
Edit
...
I don't want to do this by hand, but want an app that will get the list of menu items automagically. (Years ago I came across an app that would suck the menus out of an application and throw them into an array in a text file, but can't find anything like it now.)
My question: Do you know of an application (or some source code) that can give me a menu-item list if I point it at a application?
Thanks. Jim
File
New
Window
<divider>
Message
Post
Open
Edit
...
I don't want to do this by hand, but want an app that will get the list of menu items automagically. (Years ago I came across an app that would suck the menus out of an application and throw them into an array in a text file, but can't find anything like it now.)
My question: Do you know of an application (or some source code) that can give me a menu-item list if I point it at a application?
Thanks. Jim
Have you tried the GetMenu(), GetMenuItemCount(), and GetMenuItemInfo() APIs? There is some chance that GetMenuItemInfo() will fail when trying to access a menu in an external program. In that case, there are a couple of workarounds.
Anyway, please notice that all high-powered programs like Word and Excel allow for user customization and even the latest wrinkle in which seldom-used menu items are hidden. Thus, you have set youself a difficult task. Plrobaly easier to just write them down.
-- Dan
Anyway, please notice that all high-powered programs like Word and Excel allow for user customization and even the latest wrinkle in which seldom-used menu items are hidden. Thus, you have set youself a difficult task. Plrobaly easier to just write them down.
-- Dan
ASKER
Nice suggestion, but the resource extractor didn't give me any menus.
Yes, Dan, GetMenu(), GetMenuItemCount(), and GetMenuItemInfo are my plan B. I just didn't want to re-invent something already available. Writing the menus by hand is plan C, but a tool could save us hundreds of hours/year.
Thanks.
Jim
Yes, Dan, GetMenu(), GetMenuItemCount(), and GetMenuItemInfo are my plan B. I just didn't want to re-invent something already available. Writing the menus by hand is plan C, but a tool could save us hundreds of hours/year.
Thanks.
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, Matt. This will do a lot of work for me.
For some reason, though, it does not work with Microsoft products. Any ideas?
Jim
For some reason, though, it does not work with Microsoft products. Any ideas?
Jim
That’s because Microsoft doesn’t use standard menus in this products. Actually some of them don’t have a menu at all. Instead they have a toolbar, for instance, with buttons displaying only text.
But if you still want, here is a link to a freeware resource extractor. The output is a little goofy and is dumped under the directory where you install this program.
http://demosten.com/resextr/