Notifications
Clear all

[Closed] Clear MacroRecorder by maxscript

I can’t find any in fo on this. I do use clearlistener() alot of the time but want to clear the MacroRecorder too. Any ideas?

Si

9 Replies

I’m interested in this as well. So far I tried free/flush methods on the macroRecorder stream, same with SDK methods (also Rewind() there) and even postMessage to send CTRL+D to its hWnd (but everytime, main max window caught the message instead…). Nothing seems to work and I don’t have other ideas.

UIAccessor.SetWindowText (windows.getChildrenHWND (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListenerWindow)[2][1] ""

Actually there’s a listener class instance available.

fn ClearListenerWindow macro:true listener:true =
(
	if macro do UIAccessor.SetWindowText (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListener.MacrorecBox ""
	if listener do UIAccessor.SetWindowText  (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListener.EditBox ""	
	ok
)

UIAccessor.SetWindowText, that’s perfect! Thank you.

this is what I use from the sdk

SendMessage(the_listener->edit_box, WM_SETTEXT, 0, (LPARAM)_T(""));  // clears the listener
SendMessage(the_listener->macrorec_box , WM_SETTEXT, 0, (LPARAM)_T(""));  // clears the macro recorder

you have to include both
maxscrpt/MAXScrpt.h or maxscript/maxscript.h
and
maxscrpt/Listener.h or maxscript/util/listener.h
btw

or what i use:

SetWindowText(the_listener->macrorec_box, L"");
SetWindowText(the_listener->edit_box, L"");

same thing with one more function call

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

how is about:

SendMessage(the_listener->edit_box, SCI_CLEARALL, 0, 0); 

?

taking into account that the edit_box (and macrorec_box) a MXS_Scintilla window?

sure

for later versions of max then

windows.sendMessage (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListener.MacrorecBox 2004 0 0