Monitor mouse event

What about using the COMMAND mode when create new script? Is that make the script run in plug-in way?