folding & maxscript

Discuss syntax highlighting or submit new syntax files.
Post Reply
cpb
Posts: 5
Joined: 01 Aug 2011 01:34

folding & maxscript

Post 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]
)
Attachments
maxscript.zip
(23.23 KiB) Downloaded 933 times
cpb
Posts: 5
Joined: 01 Aug 2011 01:34

Re: folding & maxscript

Post by cpb »

Also: The indent guide line seems to be affected by the same problem...
Attachments
RJTE_maxscript_folding.jpg
RJTE_maxscript_folding.jpg (30.05 KiB) Viewed 21564 times
AlexBreems
Posts: 136
Joined: 08 Sep 2010 12:49

Re: folding & maxscript

Post by AlexBreems »

cpb
what color theme do you use?

you did it?
cpb
Posts: 5
Joined: 01 Aug 2011 01:34

Re: folding & maxscript

Post by cpb »

yep it was made for the maxscript highlighter.
Attachments
maxscript_ssx.zip
(227 Bytes) Downloaded 836 times
AlexBreems
Posts: 136
Joined: 08 Sep 2010 12:49

Re: folding & maxscript

Post by AlexBreems »

cpb wrote:yep it was made for the maxscript highlighter.
good job :wink:


Rickard, what about color themes?

this functionality is planned? :)
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: folding & maxscript

Post by Rickard Johansson »

It will be very difficult to implement. We'll see...
cpb
Posts: 5
Joined: 01 Aug 2011 01:34

Re: folding & maxscript

Post 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...
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: folding & maxscript

Post 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.
Post Reply