Notifications
Clear all

[Closed] MXS Editor. Change Parenthesis highlight color

Is there a way to change the highlight color of the parenthesis character in MXC editor?
When I select an opening parenthesis, the correspondent closing one highlights in a dark blue color, very similar to black, that old people like me have serious problems to find.

Thanks in advance.

27 Replies

I’m using dark theme from Josef. Link to thread

there’s a few lines which you may edit as you like in MXS_EditorUser.properties.
I just changed it to yellow.

colour.brace.highlight=fore:#ffcc00
colour.brace.incomplete=fore:#0066ff

I use my own color them, also dark, but different than the Dark Theme. I have a problem with the color that is used to highlight the row when the F2 is used:

Here is the image:

I want to change this light blue color with somethng else, but I don’t know what I have to change. So, any help will be appreciated.

2 Replies
(@serejah)
Joined: 11 months ago

Posts: 0

How do you achieve that several lines backgrounds being colored that way at once? F2 doesnt work for me that way, or I just don’t know how to do so.

Check out that line in MXS_editor.properties file

caret.line.back=#00ff00
(@miauu)
Joined: 11 months ago

Posts: 0

My bad. To have several lines colored as in the image you have to use Ctrl+F2(Toggle bookmark). And I want to change the color that is used to highglught bookmarked lines. This:

caret.line.back=#00ff00

can’t change the color of the bookmarks

Hey @Serejah! You’ve saved my eyes! Thanks a lot.

In my 3dsMax 2014 version, the file to touch is “MXS_Editor.properties”, and the line to change:

Brace highlight

style.*.34=fore:#FF4500,bold

As you can see, now I have a beautiful dark orange (#FF4500), perfect for me.
Thanks again.

I benefit this thread about MXS Editor for other ‘related’ question:
How can I close an opened file in the editor through maxscript code?

Nothing changes for me when I toggle a bookmark using Ctrl+F2.
Moreover I couldn’t find a setting to make my 2012 max editor background dark maybe that’s the reason I can’t see them white or any other color than default background when toggling.

Btw there’s another great tool from Josef to automate some tasks in mxseditor.
Closing a doc would be something like.

MXSEditor.menuCommand “IDM_CLOSE”

I’d like to know if it’s possibe to bind some maxscript code execution to a shortcut while in editor.
That’s the reason i’ve abandoned my attempt to make a calltip with function arguments which I always seem to forget

Strange. See the image – max2012, the background is dark. I use the same file(with colors for MaxScript Editor) for all installed 3dsMax and everything works with no problems.

By the way, this is the file that I use in all 3dsMax versions(in 2012 too):

https://dl.dropboxusercontent.com/u/35093423/scripts/MXS_EditorUser.properties

scite doc

bookmark.fore
bookmark.back
bookmark.alpha

The colours used to display bookmarks in the margin. If bookmark.fore is empty then a blue sphere is used. When the margin is turned off (line.margin.visible=0 or margin.width=0), bookmarks are shown by a change in the background colour of the line with the translucency set with bookmark.alpha.

1 Reply
(@miauu)
Joined: 11 months ago

Posts: 0

This works. Thank you. I was reading the http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_9014954D_C25C_45B5_BD9C_19260B852185_htm

It is mentoined there,

But you found it first.
Thank you again.

actually there’s no mention about line.margin.visible=0 and margin.width=0
got it from russian help file

I checked your file and it works exactly as you’ve shown above.

1 Reply
(@miauu)
Joined: 11 months ago

Posts: 0

I needed the bookmark code to change the color of the bookmarekd lines. Thank you again.
Now is time to update the Abbreviation file and to save it for later use.

Did someone know how to enter the current date and time in the code using the abbreviation?
Edit: I found the solution, using the code, written by denisT in this thread: http://forums.cgsociety.org/showthread.php?f=98&t=899696&highlight=MXS_Scintilla


	fn myAssembly =
	(
		source = ""
		source += "using System;
"
		source += "using System.Runtime.InteropServices;
"
		source += "public class MyOps
"
		source += "{
"
		source += "	[DllImport(\"user32.dll\")]
"
		source += "	public static extern int SendMessage(Int32 hWnd, int wMsg, int wParam, [MarshalAs(UnmanagedType.LPStr)] string lParam);
"
		source += "}
"

		csharpProvider = dotnetobject "Microsoft.CSharp.CSharpCodeProvider"
		compilerParams = dotnetobject "System.CodeDom.Compiler.CompilerParameters"

		compilerParams.ReferencedAssemblies.Add "System.dll"

		compilerParams.GenerateInMemory = on
		compilerResults = csharpProvider.CompileAssemblyFromSource compilerParams #(source)
			
		(compilerResults.CompiledAssembly).CreateInstance "MyOps"
	)
	global ops = if ops == undefined then myAssembly() else ops
	(	
		fn _mxs_Textbox = 
		(
			stopLoop1 = false
			tb = undefined
			for c in (windows.getchildrenhwnd 0) where c[4] == "MXS_SciTEWindow" while stopLoop1 == false do 
			(
				stopLoop2 = false
				for t in (windows.getchildrenhwnd c[1]) where t[4] == "MXS_Scintilla" while stopLoop2 == false do
				(				
					stopLoop1 = true
					stopLoop2 = true
					tb = t[1]
				)
			)
			if tb != ok then tb else undefined
		)
		
		if (tb = _mxs_Textbox()) != undefined do
		(
			EM_REPLACESEL = 0xC2
			
			localTimeStr = "--	" + (localTIme)
			any_text = localTimeStr
			
			-- Insert Text or Replace Selection:
			ops.SendMessage tb EM_REPLACESEL 1 any_text -- 1 means to make it undoable
		)
	)


The only issue is that I have to click outside of the MaxScript Editor to run the code as a macro.

mxseditor allows to define a shortcut for custom user commands.
Klaas has a great Git example on his site

I have a simple console app that can take some user input, process it, find mxseditor document IntPtr and put it back processed.
But there’s also a few things that I don’t know how to approach at the moment.
One is that before execution editor prompts the ‘Save changes’ dialog which is annoying.
Another one is an editor output panel that appears after every use of the command.

Maybe that’s a task for a global keyboard hook?

Page 1 / 2