ScriptSpot home

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

thanks.

Panayot Karabakalov

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!

Reply to titane357
Panayot Karabakalov

RepeatLastOperation

just in case this may help, the edit poly has

RepeatLastOperation()

function.