Run Mel Command From Channelbox?

I was wondering if there was some way to run mel script through the channelbox of a node.
The reason for it would be to optimized the pipeline. We wanted to attach object related script to the object itself. Feel free to suggest other means to achieve that!

Thanks

Have you tried scriptJob -attributeChange "obj.attr" "proc"?

e.g.:

// pCube1 translation x change
{
int $test = scriptJob -ac pCube1.translateX "print \"pCube1.tX\"";
}