View Full Version : encryptScript and MacroScripts


mak83
03 March 2009, 07:14 PM
I've written some scripts and encrypted them with the encryptScript method.

One of the scripts contain some macroScript-sections like this

macroScript mnuEditObject category:"Test" tooltip:"Edit Selected Object"
(
on execute do
(
createDialog rollEditObject width:400 height:400
)
)

All other scripts work fine, but when I try to load and execute the encrypted mse-script that contains these macroScript-sections, 3ds Max displays the following error message:

http://img210.imageshack.us/img210/7499/errort.png

Of course loading and executing the original .mcr-file works fine.

I get the same behaviour when I copy and paste the code from the mcr-file into one of the ms-files.

Unfortunately I have not yet fully understood what's exactly the difference between mcr-files and ms-files.

But could it be that the encryptScript method does not work with macroScripts? Or has someone an idea for the cause of this problem?

thx
M.

djlane
03 March 2009, 11:15 PM
from what I can remember encryptscript does not work with macros but a workaround is to save them main portion of your script to a seperate encrypted script file and then use filein with your macroscript.

mak83
03 March 2009, 06:05 AM
from what I can remember encryptscript does not work with macros but a workaround is to save them main portion of your script to a seperate encrypted script file and then use filein with your macroscript.

Ok, thanks alot for the quick answer! I think I'll do it that way.

CGTalk Moderation
03 March 2009, 06:05 AM
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.


1