PDA

View Full Version : simple applescript questin


sparaig
10-13-2006, 05:13 PM
why isn't this working?I create a very simple file, tester.mel, and save it in the scripts folder:

global proc tester(){print("test\n");}

I then create a simple applescript and run it:

tell application "Maya"
execute "source tester"
execute "tester"
end tell

I get the error:// Error: source tester; //
// Error: Line 1.14: Cannot find file "tester" for source statement. //

bduncan
10-13-2006, 06:30 PM
If you added the mel file after Maya had already started, you'll need to tell Maya to refresh its list of known MEL files using the 'rehash' command.

sparaig
10-13-2006, 07:29 PM
If you added the mel file after Maya had already started, you'll need to tell Maya to refresh its list of known MEL files using the 'rehash' command.

<sob> thanks very much. Is it just me, or is MEL documentation rather light?

CGTalk Moderation
10-13-2006, 07:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.