problems with returning the number of a selected menu item

I was trying to get the number of a selected menu item. This is so that I can reference the matching item in another list. I tried:


set curMenuItem to (the number of the current menu item of popup button "MyMenu" of window "Mywindow")

This always returns a value of 1, no matter which item in the popup menu is selected. So this appears to be returning the count of the items not their place in the list. I was using a number because the list that populates the menu and the matching list have different items in them so the title does me no good.

Is there a way to do this?
Dee

Hi Dee,

you can use the property tag (class: integer)of menu item, but you have to set the tags
for each menu item in the Info window of Interface Builder.

Take a look at Menu Suite of AppleScript Studio Terminology Reference in the ASS Documentation

thanks, that was exactly what I was looking for

Dee