PDA

View Full Version : Finally abandoned the maxScript editor


Blue
04-06-2006, 07:01 PM
It took me from when script was first introduced to max till now to finally move to an external editor, I started using PsPad, I added syntax highlighting to it for maxScript and Mel, and I also added a live connection to maya and added the REZN8 com bridge to comunicate with max. It supports vbScript scripts and javaScript scripts to extend its functions. It also supports snippets, blocks of code that can be defined and then inserted on demand, could be as simple as a for loop or as complex as a setting up an initial UI. Best of all its free.

Just felt like sharing.

P.S. Lets not forget multiple undos :)

Gibbz
04-07-2006, 10:24 AM
How have you set this up to work with maxscript? Is there a color coding setup to use with this?

Is there an easy way to quily test in max(Crtl-E in maxscript editor launches the script for example)....

Cheers

stuh505
04-07-2006, 03:40 PM
I'm going in the opposite direction...I've begun using maxscript to replace text editors because I can leave the windows open while manipulating things in max without them being minimized!

Blue
04-07-2006, 08:47 PM
How have you set this up to work with maxscript? Is there a color coding setup to use with this?

Is there an easy way to quily test in max(Crtl-E in maxscript editor launches the script for example)....

Cheers

I created a syntax file (http://www.kickass3d.com/blue/MaxScript.zip) for PSPad so it does display the color coding. And the way I have PSPad setup I use F9 to Evaluate a script or selection of code. But there is supposed to be a way to remap the keyboard shortcut commands.

Blue
04-07-2006, 08:49 PM
I'm going in the opposite direction...I've begun using maxscript to replace text editors because I can leave the windows open while manipulating things in max without them being minimized!

PSPad has a stay on top feature so it can exibit the same behavior. I use dual monitors so I have max open in one and PSPad open in the other.

Blue
04-07-2006, 09:12 PM
Also forgot to say that actually uses the maxscript help when editing an ms or mcr file and searches for help on what is highlighted.

Gibbz
04-08-2006, 03:33 AM
so you can use pspad to evaluate and run code in max?
how do i set this up?

Cheers

Blue
04-09-2006, 11:43 PM
so you can use pspad to evaluate and run code in max?
how do i set this up?

Cheers

Yes I run and evaluate scripts from PSPad in max. I used the REZN8 com bridge. The files can be downloaded from here (http://www.rezn8.com/freeware.html) . Just adjust the reg file for max 8 and setup the PSPad commands to use its formating. If you have any issues getting this going I'll post a screenshot of my settings.

OlegAlexander
05-28-2006, 07:49 PM
Dear Blue:

I understand you were able to set up PSPad to communicate with Maya. I have tried this as well. I got as far as being able to communicate with Maya using Putty and the commandPort command. But I was not successful in sending commands from PSPad.

Could you please write a small tutorial on how you set up PSPad to talk to Maya? Thank you!

f97ao
05-29-2006, 09:09 AM
Also forgot to say that actually uses the maxscript help when editing an ms or mcr file and searches for help on what is highlighted.

That's cool. How did you do that?

I'm thinking about using UltraEdit myself.
There are a few things I expect to miss when I go out of max though. I use the Visual Maxscript for adjusting icons alot for example. That should be a hassle to operate with an external editor

/A

Blue
05-30-2006, 09:08 PM
Dear Blue:

I understand you were able to set up PSPad to communicate with Maya. I have tried this as well. I got as far as being able to communicate with Maya using Putty and the commandPort command. But I was not successful in sending commands from PSPad.

Could you please write a small tutorial on how you set up PSPad to talk to Maya? Thank you!

I wrote a vb script to save the current file, then send a command (through a dll) to maya to source the file. The dll I used is now expired so I'm looking for a new one, or I'll have to write one.

Note: I had to replace \ with / and chr(39) with chr(34) for maya to respect the incoming file path.

Blue
05-30-2006, 09:09 PM
That's cool. How did you do that?

I'm thinking about using UltraEdit myself.
There are a few things I expect to miss when I go out of max though. I use the Visual Maxscript for adjusting icons alot for example. That should be a hassle to operate with an external editor

/A

Its not to bad, with my setup I can send my script to max, edit it and when I go back to PsPad it knows that there were changes made because the file has been saved. UE should have this same feature and prompt to reload a file that has been externally updated.

Gibbz
06-10-2006, 09:04 AM
can i grab a screneshot of your psp pad setup I have no clue how to setup that part of the process...

im using the following...

"D:\Program Files\Autodesk\3dsMax8\Scripts\Startup\mxscom.exe" -f (%File%)

in pspad to execute the sctipt, but it doesnt work.

Im using max 8 btw(there is no max 8 .reg file so ive used the version 7)

Gibbz
06-10-2006, 10:51 AM
Ok cool i got it working :)

Cheers!

Blue
06-10-2006, 11:00 AM
I use: (mxscom.exe is in the root of PSPad)
%PSPath%\mxscom.exe -f %File%

Also RegisterOLEControl.ms needs to go into the max\scripts\startup folder. (it comes with mxscom.exe from rezn8)
-- registers running of files and executing script code to OLE.
registerOLEInterface #( filein, execute, edit )


Lastly the registry files needs to be edited for max8, should be fairly straight forward
REGEDIT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; 1. Change the path in the last line of this file to point at your
; current 3ds max executable directory, then
; 2. Double click this file in Windows Explorer
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; registration info MAX.Application (defaults to MAX.Application.8)

HKEY_CLASSES_ROOT\MAX.Application = OLE Automation MAX Application
HKEY_CLASSES_ROOT\MAX.Application\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}
HKEY_CLASSES_ROOT\MAX.Application\CurVer = MAX.Application.8

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; registration info MAX 8.0

; (Application Object)
HKEY_CLASSES_ROOT\MAX.Application.8 = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\MAX.Application.8\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3} = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\ProgID = MAX.Application.8
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\VersionIndependentProgID = MAX.Application
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\LocalServer32 = C:\Program Files\Autodesk\3dsMax8\3dsmax.exe

Blue
06-10-2006, 11:04 AM
Ok cool i got it working :)

Cheers!

Cool, guess I was posting as you got it working. :thumbsup:

DonMeck
07-31-2006, 11:26 AM
When I hit f9 (compile) in pspad i get the mxscom error pop-up message (roughly translated to english)

"Runtime error '429': Object creation by ActiveX component not possible"

Any idea what this means?

davestewart
08-01-2006, 09:58 PM
I used the Rezn8 bridge and Crimson Editor a while back, but stopped as when any maxscript errored, there's no feedback or line highlighting.

Anyone got any solutions to this?

Cheers,
Dave

AlpineMan
08-02-2006, 01:24 AM
I used the Rezn8 bridge and Crimson Editor a while back, but stopped as when any maxscript errored, there's no feedback or line highlighting.

Anyone got any solutions to this?

Cheers,
Dave

Dave. None as yet. Some parts of the maxscript core would have to be overhauled for that to happen.

Chris J.

DeKo-LT
08-07-2006, 05:49 PM
Can somebody reupload mxscom?

rezn8 site down... :sad:

Thanks

PiXeL_MoNKeY
08-24-2006, 05:38 PM
DeKoVV: I have attached the mxscom.zip file for you.

I have setup PSPad as follows:
1) Settings > User Highlighters > load MaxScript.ini > Save
2) Highlighter Settings > <not assigned> > Specification > User Highlighters > Maxscript
3) Highlighter Settings > Maxscript > External Applications >

Name: Maxscript Execute
Application: %PSPath%Plugins\mxscom.exe -f %File%

Name: Maxscript Open
Application: %PSPath%Plugins\mxscom.exe -e edit "%File%"

4) Settings > Program Settings > Key Map > File > Maxscript Execute Crtl+E > Maxscript Open Shift+F11 > Save to File (Otherwise your keymap won't be saved)

Note: Crimson Editor will save prior to executing, PSPad does not or I am not sure how to enable it to do so. So if you execute Maxscript Open prior to saving the file it will open a temp file instead of the current file.

-Eric

DeKo-LT
08-24-2006, 06:16 PM
Thank you Pixel_Monkey very much :thumbsup:

PEN
08-24-2006, 09:02 PM
Does any one know where I can find color coding for crimson editor?

PEN
08-24-2006, 09:44 PM
Looks like I have found colour coding for Max but I have not been able to get the bridge to work with Max 8. Has any one had any luck using crimsom editor with Max and the com bridge?

HalfVector
08-24-2006, 09:56 PM
Does any one know where I can find color coding for crimson editor?
MAXScript syntax coloring comes with the Crimson Editor installation.

Has any one had any luck using crimsom editor with Max and the com bridge?
Yeah. I followed these instructions (http://www.rezn8.com/wiki/doku.php?id=maxscript_com_bridge_mxscom).

Greets.

HalfVector
08-24-2006, 10:04 PM
I forgot to mention that I edited the maxscript7.reg file that comes with the mxscom distribution. This is the final content:

REGEDIT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; 1. Change the path in the last line of this file to point at your
; current 3ds max executable directory, then
; 2. Double click this file in Windows Explorer
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; registration info MAX.Application (defaults to MAX.Application.8)

HKEY_CLASSES_ROOT\MAX.Application = OLE Automation MAX Application
HKEY_CLASSES_ROOT\MAX.Application\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}
HKEY_CLASSES_ROOT\MAX.Application\CurVer = MAX.Application.8

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; registration info MAX 8.0

; (Application Object)
HKEY_CLASSES_ROOT\MAX.Application.8 = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\MAX.Application.8\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3} = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\ProgID = MAX.Application.8
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\VersionIndependentProgID = MAX.Application
HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\LocalServer32 = C:\3dsmax8\3dsmax.exe

The only thing that changes is the 7s for the 8s. Also, don't forget to replace the 3dsmax path (at the end of the file) with your installation directory. And of course, you have to execute that file (the reg file).

Hope that helps.

PD: oh, BTW, if you want the crimson editor window to stay always on top, you can use some utility like this one (http://www.fadsoft.net/AlwaysOnTopMaker.htm).

PiXeL_MoNKeY
08-24-2006, 11:17 PM
Paul,
The most up to date CE syntax files can be found here (http://www.crimsoneditor.com/english/board/CrazyWWWBoard.cgi?db=files&mode=read&num=1745&page=1&ftype=6&fval=maxscript&backdepth=1) and previous version can be found here (http://www.crimsoneditor.com/english/board/CrazyWWWBoard.cgi?db=files&mode=read&num=1136&page=1&ftype=6&fval=maxscript&backdepth=1). Make sure that you install the script files in the max directory, change the registry entries, and setup up the shortcuts in CE. Personally I am switching to PSPad cause CE is no longer in development. There is a group making Emerald Editor, an open source version of CE, but nothing has been released so far.

-Eric

PEN
08-24-2006, 11:22 PM
Thanks guys I got it working. I didn't know that CE isn't being worked on any more. That is a shame as I have been using it for years for perl and other languages. Maybe I will have to switch as well.

I'll have a look at it and see if I like it. I can't imagine it is all that different.

PiXeL_MoNKeY
08-25-2006, 03:43 AM
If you like Crimson Editor you will probably want to keep an eye on Emerald Editor here (http://www.emeraldeditor.com/). Like I said they haven't posted anything yet. There are a few quirks I don't like about PSPad, but overall I think it is easier to navigate than CE. You could for example have multiple scripts in one project and on top of that multiple projects. Like CE it has syntax for all kinds of formats, but also allows for linking to an external compilier so you can compile from within PSPad. Plus looking at the Highlighter options it does seem to be a little more customizable.

Just my 2 cents,
-Eric

PEN
08-25-2006, 02:24 PM
I think I will take a poke at it next week.

PiXeL_MoNKeY
08-25-2006, 06:50 PM
Also on the PSPad setup, if you want it to auto indent like CE you need to:
Highlighter Settings > Maxscript > Specification > Extended Indent Chars in the first box add ( in the second box add ).

This makes it indent when you insert a ( and go to the next line. Then it will remove the indent at the ).

Hope this helps,
-Eric

DeKo-LT
08-25-2006, 07:37 PM
Here is link how to setup UltraEdit for working with MAXScript com bridge:
http://www.scriptspot.com/Tutorials/MaxUltraEditInstructions.htm

CGTalk Moderation
08-25-2006, 07:37 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.