Tear off menu with a script - how to?

Hi, I am just wondering if it's possible to create a script that tears of the menu, same as if you would click on double-line of a drop-down menu. For example when you go to Animation set -> Character and hit double line you

Hey LSD man...

Forgive me if I'm not understanding your post correctly, but if you're talking about the code for a tear off menu, you can create your own with:

menu -to 1

Adding your own menu to the main Maya frame can be done like this:

setParent $gMainWindow;
menu -l "LSD Animation" -aob 1 -to 1 "LSDMenu";
menuItem -l "sphere" -c "sphere"-ann "sphere command";
setParent -menu ..;

Basicly I need a script button on a shelf that tears of any menu selection from my animation set. Just like if you would click on double line, but since my main menu bar is hidden I can't do it....

No function that i know of... You could easily read the menu contents in the script that generated the menu and recreate it tough in another srcript. (or actualy you could be nifty enough and get the ui name and recreae one in a window).

Or use teh hotbox like teh rest of us mortals.