Posts: 20
Threads: 9
Joined: May 2006
Hi,
I want to list out the items in the menu bar, also the number of items listed...
how is this possible....
I tried using the acc property, but i could not find a right command to list the items in the menu bar....
Regards,
nithin
Posts: 12,073
Threads: 140
Joined: Dec 2002
Example 1
Acc a=acc("Application" "MENUBAR" "Notepad" "Notepad" "" 0x1001 0 0 "first")
rep
,str s=a.Name
,out s
,a.Navigate("next"); err break
Example 2
Acc a=acc("File" "MENUITEM" "Quick Macros" "ToolbarWindow32" "" 0x1001)
rep
,str s=a.Name
,out s
,a.Navigate("next"); err break
Posts: 20
Threads: 9
Joined: May 2006
Thanks for the reply Gintaras...!! but i was looking for something else...
i want to list out the items(also the count) in each menu...
eg: in Notepad under File Menu we have New, Open, Save, SaveAs, PageSetup.......
Posts: 12,073
Threads: 140
Joined: Dec 2002
ARRAY(str) ar
acc("" "MENUITEM" "Notepad" "Notepad" "" 0x8000 &acc_enum_menu &ar)
out ar
Function acc_enum_menu
;/
function Acc&a level lParam
str s=a.Name
rep(level) s-" "
;out s
ARRAY(str)& ar=+lParam
ar[ar.redim(-1)]=s
ret 1