script replace of objects

Tj Shredder's icon

Is there a new scripting way of replacing objects (keeping their connections) with thispatcher?
I only know the Max 4 way, which usually scrambles my fonts and is pretty cryptic.
Simple example: I want to replace a [route 1 2 3 4] with [route 8 7 6 5].

The other annoyance of the old replace command is, that I have to know the exact coordinates of the object. Of course everybody wants it usually replaced at the same spot and size (like with the paste replace command I can invoke by hand...). In case I want it somewhere else, I know the position commands already...;-)

Stefan

Florent Ghys's icon

I am interested in this topic. Any update ?
I'd love to be able to replace an object with a script message to thispatcher.
Florent

Wetterberg's icon

I know this isn't what you're looking for, but the route object in max6 has inlets for each of its route outlets, too. Just... you know, fyi.

tohm's icon

Not sure if this will help, but I used to open the patcher in textwrangler and do a find and replace...

Andre Serve's icon

Is there still no way of doing this that anyone could let us know about?

Roman Thilenius's icon


i guess the answer is still the same as always: you can only replace objects and connections to it when you (i.e. the patcher) knows the position and inlets/outlets of the original object already.

the object box and the objectname in it are always one unit.

fraction's icon

script replace "myobjectscriptname" newex 0 0 200 12 "myobject(args)"

im looking for the js equivalent, if it exists.