Remove item from popup button after population

Hi,

I’ve learned how to dynamically populate the contents of a popup button–what fun. I also know to remove the “item1” before populating it with a line like this:

delete every menu item of menu of popup button "disks" of tab view item "disklist" of tab view "tabs" of window "main"

However, after populating the menu from a loop, I want to go back into the menu and remove a single entry by name:

delete every item "network" of menu of popup button "disks" of tab view item "disklist" of tab view "tabs" of window "main"

This results in a “Can’t make network into class type blah blah error…” I would really like to know how this is done…

Close, but AppleScript is weird, so:


delete (menu items of menu of popup button "disks" of tab view item "disklist" of tab view "tabs" of window "main" whose title = "insert menu item title here")

What are you trying to do, exactly?