change a lot of messages

Jul 10, 2013 at 6:01am

change a lot of messages

I have a patch that I need to multiply lets say. After each message in the patch (around 50 messages), I have to add 2, 3, 4 and so on. Is there a way to do this faster than dong it manually? opening as text is not helpful as I cannot do replace all.

#255535
Jul 10, 2013 at 7:21am

why can’t you do replace all ?
there is several options to help you : cmd-f, type the message you want to replace, replace each time (navigation between boxes automatic, with “next”) – copy the thing with which you want to replace, select the thing to replace, shift-cmd-v – this can be done by scripting certainely (not sure how. check [universal] [thispatcher] if you need it that way). btw, if there is so much thing to replace and if you need to replace often, there must be an easier way than replacing your messages each time – with $1 $2 etc, with math operations etc…

#255546
Jul 10, 2013 at 7:56am

right on; if there’s ever a need to replace a ton of one thing, then there’s an easier way of doing it than replacing each of them.

a message with “this is my message $1″ can be really useful, as well as using pak/pack/join for it.

#255551
Jul 10, 2013 at 8:04am

do you mean that all the messages you have are different and you still want to add a 2, 3, 4 after each message?

perhaps something like this?

<code>

– Pasted Max Patch, click to expand. –

</code>

#255554
Jul 10, 2013 at 9:54am

I cannot post my patch apparently. Is it possible to get something like this “send thismessage#1″ wher I can change #1 in some way?

#255567
Jul 10, 2013 at 9:59am

Well here it is. Any suggestion? In the worst case I open it as text and change everything. However, something dynamic would be more interesting.

#255568
Jul 10, 2013 at 11:14am

Your patch didn’t show up again..

#255576
Jul 10, 2013 at 11:20am
#255577
Jul 10, 2013 at 11:40am

If you are populating all of those message boxes with coll data, why not dynamically change and output the contents of the coll? Perhaps a second coll that runs parallel to the existing data source that you can edit and output as needed.

#255579
Jul 10, 2013 at 12:38pm

Metamax: Could you explain with a patch. I do not really understand what you want to say. Now, about the patch: The patch receives data from either a coll (for offline operation) or in realtime (from the internet). In either case, the data are formatted as in the message box containing all the datapoints. These data have to be unpacked to be able to be sent to the next patch which combines several datapoints to make mappings.

#255582
Jul 10, 2013 at 12:56pm

I tried to create an example but I couldn’t mimic the data you are receiving from yahoo. I keep getting errors when I create random values. I also have to get back to work.

What I’m saying is if you are populating the patch with data from a coll, there may be a way to update/change those values from the back end. That way, instead of trying to alter message boxes individually after they have been populated by a coll, change the values prior to the patch. If need be, repopulate a second coll with those values and send those to the patch. That way, the messages in the patch will continue to receive values in the same format. Just a thought.

btw, are you using copy compressed? The patch code you posted in dropbox is over a half a MB.. whereas a compressed copy is only 18KB…

This is the original patch that you couldn’t post:

– Pasted Max Patch, click to expand. –
#255583

You must be logged in to reply to this topic.