<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff &lt;<a href="mailto:luigi.rensinghoff@freenet.de">luigi.rensinghoff@freenet.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div style="word-wrap:break-word"> <br><div><div>do you know how the numbers change if you cut everything from patch and paste it back in ?? my impression is that it does not start from zero ?? What if you copy it to a new patch ? then it should start from zero.....</div> </div></div></blockquote><div><br></div><div>Well, if you are making these patches PROGRAMMATICALLY, then you can't cut and paste, as there is no way to do that in programming.</div><div><br></div><div>You might want to open up some abstractions in a text editor, you can see the code that PD uses to create these objects directly. It is very enlightening.</div></div></blockquote><div><br></div><div>cut and paste is possible too.  Check out pd-msg for the details.  Basically, you need to programmatically draw a box around the around the area to select the objects, then send the cut and paste messages.</div><div><br></div><br><blockquote type="cite"><div class="gmail_quote"> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Well sure i could keep track of that....but what if i would like to modify an existing patch....</span></div> </div></div></blockquote><div><br></div><div>Can't do it programmatically. You can only add objects to an existing patch, and if it is something that already has existing objects, there is no way to know how many objects are already in a patch.</div> <div>mike</div></div></blockquote><div><br></div><div>It would be non-trivial but possible.  You could count the lines in the .pd file with "#X obj" in them, that would give you the total number of objects.  I guess you'd have to count symbolatoms and floatatoms too.</div><div><br></div><div>.hc</div><div><br></div><br><blockquote type="cite"><div class="gmail_quote"><div><br></div></div><br clear="all"><br>-- <br>Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.<br>—Yehudi Menuhin (1916–1999), musician <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a></div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>Using ReBirth is like trying to play an 808 with a long stick.    -David Zicarelli</div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>