Skip to content
Tags

,

MEL: Find and edit a procedure

by nikos on May 13th, 2011

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 ] );
}

From → MEL

No comments yet

Leave a Reply

You must be logged in to post a comment.