Page 1 of 1

folding & maxscript

Posted: 01 Aug 2011 02:05
by cpb
Hello,
I've been putting together a maxscript syntax file and have run into a couple of problems:
Folding of functions is tricky; so far it either ends at the 1st close-bracket ')' or not at all.
Also the 'on events show up in the methods part of the code explorer as 'do(' instead of 'on button pressed do('.

Any help most appreciated.
Syntax file is attached...

Code: Select all

function striplastnums str = (
	astr = str
	nn = (trimright astr "1234567890")
	fp = ""
	if nn.count != str.count do(
		stl = nn.count
		if stl != 0 do(
			fp = (replace str 1 stl "")
		)
	)
	return #(nn, fp)
)

on button pressed do(
   p = striplastnums alist.selected
   alist.items[alist.selection] = p[1]
)

Re: folding & maxscript

Posted: 10 Aug 2011 22:33
by cpb
Also: The indent guide line seems to be affected by the same problem...

Re: folding & maxscript

Posted: 11 Aug 2011 19:05
by AlexBreems
cpb
what color theme do you use?

you did it?

Re: folding & maxscript

Posted: 15 Aug 2011 20:01
by cpb
yep it was made for the maxscript highlighter.

Re: folding & maxscript

Posted: 17 Aug 2011 14:48
by AlexBreems
cpb wrote:yep it was made for the maxscript highlighter.
good job :wink:


Rickard, what about color themes?

this functionality is planned? :)

Re: folding & maxscript

Posted: 18 Aug 2011 16:08
by Rickard Johansson
It will be very difficult to implement. We'll see...

Re: folding & maxscript

Posted: 10 Mar 2013 11:58
by cpb
^ "The selected attachment does not exist anymore."
on the above links.

Any chance to bring them back?
I don't have these anymore...

Re: folding & maxscript

Posted: 10 Mar 2013 14:25
by Rickard Johansson
I moved the forum from another server a while back, so some old attachments are gone. They now reside on a server I no longer have access to.