Notifications
Clear all

[Closed] Help with encryoting script

Hey Folk and maxscripter I’m still new in maxscript and try to make some script, I already done that , I try to encrypt that script but some strange thing happen , it do create encrypted file in specified folder, but when I remove ,say it “Doom.ms” or the original “.ms” from it folder and I execute the “.mse” file it say
“Runtime Error: EncryptScript cannot open: Doom.ms”. Why that happen folk, do something missing here or do I do wrong!?

here somekind of example you can use

encryptScript “Doom.ms”

rollout Doomo “Untitled” width:152 height:58
(
button btn1 “Button” pos:[1,2] width:50 height:16
button btn2 “Button” pos:[51,2] width:50 height:16
button btn3 “Button” pos:[101,2] width:50 height:16
editText edt1 “” pos:[-3,20] width:153 height:35
)
createDialog Doomo

=====================================================================

Thank before your answer!! thank’s man!

6 Replies

worked fine here… but… you need the entire file path in the encryptScript command…

Example: with doom.ms on “D:”

encryptScript “d:\Doom.ms”

1 Reply
(@fajar)
Joined: 11 months ago

Posts: 0

Thank man for trying but how that could it I already tried that way (in 3dsMax 9 productivity booster 32bit) over and over but as a result it do nothing (it dont create mse file in “D:” or do create mse file in current dir where the original file was where (doom.ms))

hey Kram do you ever try to remove doom.ms to another directory and try to execute the mse file again!?

in my situation and sometime It create the mse and succesfully executed even I remove doom.ms from the original directory, why this happen! is there any wrong with my 3dsMax or my script!

You need the entire filepath to the location of the .ms.

so if it the .ms file is in
c:\program files (x86)\autodesk\3dsmax9\scripts\

Then you have to call
encryptScript “c:\program files (x86)\autodesk\3dsmax9\scripts\doom.ms”

note the double \’s

You should get an .mse in the same folder as the .ms

When I did encrypt, I had the .ms’s I worked on and the .mse’s in a separate folder…

Example for encrypting from one folder of source .ms to another to hold the .mse’s


  (
  local SourceFolder = "D:\\3dsmax9\\Scripts\\MySourceScripts\\"
  local EncryptFolder = "D:\\3dsmax9\\Scripts\\MyScripts\\"
  
  -- encrypt them
  local tnScripts = getfiles ( SourceFolder + "*.ms")
  for S in tnScripts do
  	 encryptScript S
  
  -- move them
  local tnScripts = getfiles ( SourceFolder + "*.mse")
  for S in tnScripts do
     (
  	destFile = ( EncryptFolder + ( filenamefromPath S ))
  	deleteFile destFile
  	renameFile S destFile
     )
  )
  
  

Then setup your .mcr’s to point to the .mse’s in MyScripts using FileIn

.mcr files are saved in
<3dsmax root dir>\ui\macroScripts\
so they initalize when max starts…


  macroScript Doom category:"Doom Tools" toolTip:"Doom"
  	 (
  	filein  ( ( getdir #scripts)+"MyScripts\\doom.mse" )	
  	)
  

Over the years, I have had a few .mse’s that did not execute. Never figured out why.

This way is like myWay before but I not mention here, basiclly it create mse to different folder and put it back to folder I want , but still and still unfortunatelly It didn’t work at all ,
I already tried your script, though !! nice but still not work!! it give me error “Runtime error : encryted script can’t open : doom.ms” the same warning I get from removing ms from original folder! or sometime it give me warning like something like including fileIN …ahh it driving me crazyy!..wuaaaa!!

I also try to encrypt it using 3dsMax 2008 -2010 and still no result at all!! they say in 3dsMax 2010 the encrypting system had a fix but still no result for me! ahh…

just like my post before sometime it succed encrypting file and oftenly give and a error!

is there any better Idea!!

Does your script include another .ms? I don’t think you can do that inside a .mse…

Other Ideas:
Don’t encrypt.
Try Maya or XSI…

my script doesn’t include any external script couse it will bothering me also !
Nice tips !! hehehehe… I can’t operate maya or XSI, I know this software is leading in 3D industry so many friend of mine suggest it, but may be next time!

those script I wrote above ! before I posted here I tried to encrypted it but the problem is still same like my script! still give me a warning like my script!