execute last maxscriptlistener line

hello
is there a way in maxscript to execute last maxscriptlistener line ?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
titane357's picture

thanks.

thanks.

Anubis's picture

question-mark

Hi Titane,
that's easy - question-mark (?) give you last line from the listener.
Here's a few examples:

5 * 3 -- return 15
a = ? -- store that result to variable
classOf a -- Integer
 
Box() -- create box
b = ? -- store last line to variable
b -- it print the same (not create new box)...
classOf b -- Box ...(as the 'b' is object)
 
"Box()" -- put a string to the listner
execute ? -- now will create a box

And if you have something other in mind, just share more details, cheers!

my recent MAXScripts RSS (archive here)

titane357's picture

hello anubis :-) In fact I

hello anubis :-)
In fact I was looking a way to "redo" last operation.

Anubis's picture

aha :)

well, the listener can not help then.

my recent MAXScripts RSS (archive here)

titane357's picture

so bad. I'd be great to "run"

so bad. I'd be great to "run" last line of code. Thanks

Anubis's picture

RepeatLastOperation

just in case this may help, the edit poly has RepeatLastOperation() function.

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.