Notifications
Clear all

[Closed] re-execute the script from itself?

Hi,

Most of my scripts do something at loading the script. That means that I need to re-run the script every time I want some changes to take affect.

I know can change the scructure od the script or make a macro and hit a button on the toolbar every time I want to re-run the script.

But I’ve been thinking… is there a way to re-execute the script from itself? What I mean is to have a button that will actually do the same as ctrl+e from the script editor?

5 Replies

The simplest would be to use filein(), which evaluates the whole script.

filein @"C:\yourscript.ms"
1 Reply
(@juzwa)
Joined: 11 months ago

Posts: 0

I didn’t think of that! Thanks again PolyTools3D

 lo1

If you are using this, I would say there is a chance something could be redesigned better.

what do you mean?

it means something wrong in your developing or debugging system.

make a change in mxs code

save mxs file (optional)

evaluate the code

… it’s a straight forward way of max script development. why do you need anything different?