Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can i get the menu items
#1
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
#2
Example 1

Code:
Copy      Help
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

Code:
Copy      Help
Acc a=acc("File" "MENUITEM" "Quick Macros" "ToolbarWindow32" "" 0x1001)
rep
,str s=a.Name
,out s
,a.Navigate("next"); err break
#3
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.......
#4
Code:
Copy      Help
ARRAY(str) ar
acc("" "MENUITEM" "Notepad" "Notepad" "" 0x8000 &acc_enum_menu &ar)
out ar

Function acc_enum_menu
Code:
Copy      Help
;/
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


Forum Jump:


Users browsing this thread: 1 Guest(s)