Notifications
Clear all

[Closed] MXSEditor Plugin released: control Maxscript Editor via maxscript

I just released the first stable version of the MXSEditor control plugin MXSEditor.

In short, it allows the Maxscript Editor to be controlled using maxscript and exposes the Editor’s internal SciTE API to maxscript. Addionally it lets you use the Maxscript Editor in an extended viewport and control several aspects of the Editor window. It allows for pretty advanced usage, but the extended viewport functionality might come handy for many casual scripters too

Its important to read the comprehensive documentation in the ZIP to unleash the plugins possibilities

Download and detailed documentation here:
http://www.frogsinspace.at/?p=2918

or on scriptspot:
http://www.scriptspot.com/3ds-max/plugins/mxseditor-global-utility-pugin

Here’s a usage video where i drive the Maxscript Editor’s selection via live audio and use that to set the text of a spline text object in realtime

//youtu.be/wXz6RlmX-qI

9 Replies

it’s very useful.thanks.

bug:
when MXSEditor as Extended Viewport
I can’t close a doc by rightclick on tab and hit “close”.

1 Reply
(@spacefrog)
Joined: 10 months ago

Posts: 0

Ha ! – Thanks for reporting – Seems i’m blocking that menu command by accident
I never used RMB->Close on a tab before, always simply use CTRL-W…

could you help me out with getting selected autocomplete text?

GetCallbackText() returns nothing in #AutoCompleteSelection callback while GetCallbackData() has only the pointer to that text.
How can I access that data?

btw Can I modify that text prior to appending it to document?

tnx a lot for that script. That was the missing part for creating intellisense-like calltips.

1 Reply
(@spacefrog)
Joined: 10 months ago

Posts: 0

hmm – not sure. If the memory address you get in GetCallbackData()’s “text” field ( don’t know the array index at the moment ) is indeed valid ( and not undefined ) , you should be able to retreive the text using GetCallbackText() inside your callback handler. If that does’nt work, it might be a bug. Are you using a russian windows locale by the way ? This might trigger some undetected bugs …

Important to note regarding usage of the advanced features:
Don’t rely on the live, online Scintilla API documentation. Download the correct source code archive ( V1.71) using the link below and use the docs/sourcecode from that package. Current online docs include much more features of course…
https://sourceforge.net/projects/scintilla/files/SciTE/1.71/scite171.zip

The Scintilla version , 3ds Max’s editor is based on only sends the SCN_AUTOCSELECTION notification, AFTER

Just wanted to add that i’m happy that finally somebody starts to experiment with the plugin’s scripting features

well, I finally got it working. Don’t know why but it didn’t return anything until I removed #AutoCompleteSelection callback inside callback function and call AutoCComplete

ps. #UserListSelection event doesn’t seem to fire when I select item from user list

mxsecallback.disable()
mxsecallback.removeall()
mxsecallback.enable()

 ac_list = "one two three"

 fn mxse_showAC = ( mxsefuncs.call "AutoCShow" 0 ac_list )
 fn mxse_acTest = (
	

	format "before removing callback: %
" (mxsecallback.getCallbackText())	
	
	mxsecallback.remove #AutoCompleteSelection
	mxsefuncs.call #AutoCComplete
		
	format "after removing callback & AutoCComplete: %
" (mxsecallback.getCallbackText())		

	
	mxsecallback.set #AutoCompleteSelection mxse_acTest

 )


mxsecallback.set #DoubleClick mxse_showAC
mxsecallback.set #AutoCompleteSelection mxse_acTest

I’d like to show custom calltip on #dwellstart or #dwellend events but unfortunately cannot find a way I could prevent default calltip from showing.
Even after CallTipCancel() is called inside events callback function no other calltip can be shown.

ps. this default calltip shows up every time (even after mxsecallback.removeall() called) until I switch to another doc tab.

Can anything be done with the above issues?

Code to reproduce:

fn showCT = (
	
	mxsefuncs.call "CallTipShow" (mxsefuncs.call "CallTipPosStart") "can't see me"
	
)
mxseprops.set "MouseDwellTime" 400
mxsecallback.set #Dwellstart showCT

I experienced the same when testing the calltips stuff, the internal calltips which show the word under the cursor seems to cancel all user calltips. I think if you display thr calltip off text it works
Either its because of the old Scintilla code base which simply has that problem or because of the changes they Max devs did on the code

Yeah, that’s the only way it works. No calltip settings I’ve tried seem to change a thing.
It’s broken somewhere deeper.