Identifying tear-off menus


Tear-off menus have the type “Menu Window”, and GetAttribute returns the name of the tear-off menu no matter what string you pass in.

si = Application
for v in si.Desktop.ActiveLayout.Views:
	if v.Type == "Menu Window":
		print v.GetAttributeValue("!@#$@!#$!")

MenuWindowGetAttributeValue

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s