Notifications
Clear all

[Closed] anyway to intercept/record maxscript in plugin?

anyway to intercept/record maxscript in plugin?

hi, i need a way to intercept/record what the user is doing inside my plugin, i need to get the strings of script and do some work on it, anyone?

3 Replies

You can acquire the current contents of the Macro Recorder like this:

mrBuffer = macrorecorder as string 
mrCommands = filterString mrBuffer "
\r"

That gives you an array of command strings to manipulate.

Unfortunately, this doesn’t prevent the user from clearing the macrorecorder display by hand, leaving you with nothing.

There’s also no way (to my knowledge) to enable/disable the macrorecorder itself. You can force it on prior to startup by setting this value in 3dsmax.ini, however:

[MAXScript]
EnableMacroRecorder=1

[left]Hi Adam:[/left]
[left]this is not c++ code right? what is it?[/left]
[left] [/left]
[left]mrBuffer = macrorecorder as string
mrCommands = filterString mrBuffer “
\r”[/left]

Sorry, it’s MaxScript. If you’re talking about a compiled plugin, you may have more options available. I’m not as familiar with the SDK.