[MEL] Get position of mouse pointer

Hey guys, first time posting here but i have been lurking here for a while. Im a student at a game development school here in Sweden so i still have a lot to learn but this site is a great source of information and a great daily read.

On to my question. Im writing some MEL scripts and getting into python when i have time and one thing i was thinking about today was a function to get the X,Y location of the mouse pointer in Maya. What im actually trying to achive is to get a pop-up menu where your pointer is in the hypergraph with some text on basically.

Any ideas on this subject?

// Jacob

[QUOTE=Eiktyrner;2803]Hey guys, first time posting here but i have been lurking here for a while. Im a student at a game development school here in Sweden so i still have a lot to learn but this site is a great source of information and a great daily read.

On to my question. Im writing some MEL scripts and getting into python when i have time and one thing i was thinking about today was a function to get the X,Y location of the mouse pointer in Maya. What im actually trying to achive is to get a pop-up menu where your pointer is in the hypergraph with some text on basically.

Any ideas on this subject?

// Jacob[/QUOTE]

As far as I know the popupMenu location will always be constrained to yer cursor… jes parent to the hypergraph in question. like:

popupMenu -parent "hyperGraphPanel1" -altModifier 1 hypPopUpExample;
 menuItem -label "deleteME" -parent "hypPopUpExample" -command "deleteUI \"hypPopUpExample\"";