Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get menu state
#7
Macro enum menu items
Code:
Copy      Help
out
int w=win("Notepad++" "Notepad++")
int hmenu=GetMenu(w)
if(hmenu=0) out "no menu"; ret
sub.EnumSubmenu(hmenu 0)


#sub EnumSubmenu
function hm level
int i n=GetMenuItemCount(hm)
for i 0 n
,str s name=""
,MenuGetString(hm -i name)
,int hms=GetSubMenu(hm i)
,if hms
,,out s.format("%.*m[%s]" level 9 name)
,,sub.EnumSubmenu(hms level+1)
,else
,,int miid=GetMenuItemID(hm i)
,,out s.format("%.*m%i %s" level 9 miid name)
,


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)