ScriptSpot

Forum topic · Scripts Wanted

execute last maxscriptlistener line

By titane357 · 2011-11-17

Description

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

Comments (6)

titane357 · 2011-11-22

thanks.

question-mark

Anubis · 2011-11-18

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!

titane357 · 2011-11-21

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

aha :)

Anubis · 2011-11-21

well, the listener can not help then.

titane357 · 2011-11-21

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

RepeatLastOperation

Anubis · 2011-11-21

just in case this may help, the edit poly has

RepeatLastOperation()

function.