Hi,
I wrote a few tools plugins for Illustrator. http://perso.orange.fr/jlg.outils
To make a new tool added to the Illustrator toolbox, you have to use the AIToolMessage structure.
In this structure, you find the mouse coordinates. Look into AITool.h.
This structure is used by toolMouseDown, toolMouseDrag, toolTrackCursor, toolSelect, toolMouseUp, toolDeselect.
For instance,
extern AIErr toolTrackCursor( AIToolMessage *message )
{AIErr error = kNoErr;
AIRealPoint myPos;
//When your tool is selected and
//each time, your mouse moves, myPos contain your mouse position.
myPos.h=message->cursor.h;
myPos.v=message->cursor.v;
...
}
JLG.