MEL: Find and edit a procedure
Here’s a handy little tool I always use if I want to quickly find and edit the procedure of a MEL script I don’t know the location of.
The $editor variable can be changed to point to your favourite text editor.
Usage:
edit “nameofprocedure”;
global proc edit( string $file ) {
string $editor;
if (`about -linux`){
$editor = "nedit";
}
else if (`about -nt`){
$editor = "notepad";
}
string $result = `whatIs $file`;
string $buffer[];
tokenize( $result, " ", $buffer );
exec( $editor + " " + $buffer[ size($buffer) - 1 ] );
}
No comments yet