Notifications
Clear all

[Closed] EncryptScript() breaks my script

Hey Guys,

I’m trying to encrypt my maxscript but when I use ‘encryptscript’ I get problems.

I can drag the mse file into max ok and it picks up the name and icon just fine, however when i go to customize and drag the button to the toolbar it throws an error saying: “syntax error: at name expected macroscript”

my code starts as follows:

macroScript myscript_v1_0
category:"my scripts"
tooltip:"myscript v1.0"
icon:#("mine",1)
(
-----FUNCTIONS-----....

Any Ideas?

P.S. It seems if I remove everything above —-FUNCTIONS—- it works, but obviously it doesn’t create the button without that code, it just runs each time I drag it in but I can’t find a way to add the button to a toolbar doing it this way.

2 Replies
 PEN

You can’t encrypt Macro scripts. Best way to handle this would be to write your tool as a struct or just in side a set of brackets so that it is local then use filein to launch that script from a macro. This way you can have the main body of the code encrypted and the macro script will work as it should.