Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if a label is in menu or not?

Status
Not open for further replies.

xhuangtx

Programmer
Oct 25, 2013
4
US
I want to know if a label is in the menu or not before adding it. I was expecting
[$menu index $label] to return a negative value if not. But to my surprise, it errs.
Then I had a hard time to figure out a way, much longer than a minute!

Is there a built-in way of getting the number of the entries in a menu?

I think there are useful features with menu that are badly missing; I could be wrong though.

Now I need to figure out a workaround for something that seems to be a minute of work.
It's a pain.

 
As far as the number of entries: pathName index last
should work.

I don't see how you can get around your first question unless you catch the error.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top