Scripting made easier with umenu
as the title says, I’m trying to build up some custom tools to script objects for me. I want to reduce my most common patching habits down to hotkeyed scripts to streamline all my work.
In particular, I want object creation, scripting names, connections and resizing to happen automatically. I’m setting up a system (probably going to use multiple buckets, sprintfs and umenus) which will recall my most recently used objects, scripting names, sizes, or functions, in order of most recent to first used.
Depending on how advanced I want to go, I might store it in a coll, and set up different modes to retrieve the data depending on what I’m doing (most recent objects, least used, most used, objects typically used together).
umenus are always really helpful, I’ve set up a few to retrieve the object libraries from the max files (max externals/msp externals)…but they all have the .mxe tag at the end. I realize that I could just go in and delete that bit of text from each entry in the umenu, but I’m trying to get out of the habit of quick and dirty fixes. Is there any way I can format the text so that the filetype is removed? I had thought deselecting ‘show dot files’ would do it, but apparently not.
I’ll very likely be applying the same fix to a whole bunch of other ideas, so any help would be very much appreciated.
this seems to be a task for the regular expressions. does this is what you are looking for? :
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 672.3ocyW11aZCCD.9yoR8+fU9TqJKx1w4s9s86nCMkFLf2HNHhQMrp8eew1 Ig.sAHCmTPBchyuvcO9ty9d+96rreMqflaCdF7Bvx58RMVJcRMV0JrrSiKRV EmqlncRVZJkKrmTMnfVHTCLmshxiSo.1b.OC3jVPAkiQ44rLdyzWw3zjrsb0 Zv0Z4aSy1JVQEp+CXs54YbgbKU6+22vhW0rOrYJkYu9qu4EY2dA4r+nV.B6. as+Ld81ip0tNVjrjwW7yMzDglBtAxUAP9gJgGTJbINPvT0h9682IkkhIWLwR o44wKn1ety1XMZchcqoZSw1FLsmfHnef.eJP3qbcLxWJhHJbDdUbnyHmOFkb cwCdlKd.EpwfqJrHPEUfgCCFpSfLDEPliBd9ZHnD9dF.BGmSz.gzcRL3PKFg 7Ehu4xWHQpHDcbhFQWY5R2HZTXCwbrAEniefpzGcM0ACN6bjkS1va4VCGjvl CRGvnnPCvHN8sRi7iHZKecbxuA4f7NHDtaBM4+gRPCVOVWJBoucxOx.kh5BS anKnEqAO7xOJ+7lyzmdz4gxTuG6.ZdmFZs+1W.hbMH.w5PK885Hr+vVLeDSF QFLYjfZUMu5IgCVAqQDQPC9.Q8qAptvKZjpo6LJW9EZNLg04aZLYjx5WPjz3 PIClugNfRdCYyFkcm1zo5x37i5S84grQUhIaTUWThb19T0mpJ243N8Uaqbfi .Yd11MI0gE0W.Ab2GeLilKX7Xgrks8yR19I.seVKYylQ4GvoT1r0YLtnxRvn .m.uF2v0KnkSU8KLBIEDBwwq5WmJr3h8I4i+Avy4SJOG1GexLFG7PT94Fm7M 58C3ly3NK4juM9Kv3TGXmmbvujiU4STtYi4PvaXiK7F11FqCUohRw+.LeAM6 -----------end_max5_patcher-----------
It does, thanks Jan! I still have a lot of cooking to do, but I’ll be sure to post up some scripty goodness when I’m done.
Don’t forget to escape your literal full stop before the file extension: [regexp ([\w.]+)\.(mxe)]
oh yes, that’s right – overlooked it.
I’ve been switching back and forth between different projects a lot, still working on the scripting stuff. Basically I want to program a window of tools that I can use as a ‘metapatcher’. For my commonly modified attributes (size, scripting name, color, position on screen) I’d like to bypass the inspector. This is one such mechanism… click on any of the panels, hover reports it’s scripting name, you can then use the swatch to change it’s colour.
Only problem is it doesn’t seem to work when the patcher is locked. Ideally I’d like to turn this patcher into a runtime app, so my bandmates will be able to customize their own screensets of other patchers I’ve made, so the scripting is a limited means of patching on the fly even in runtime. I figure it’ll be most useful for dynamically repatching modular synth style bpatchers, but it needs this mechanism to run.
Anyone know why it freezes up? Thanks.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 1402.3ocyZ10iiZCEF95rR6+AK1QZuIcD9KLzt2T06qTk5caGshj3IgtD6Hv YlocU+uWrMICYBDbRLgQiDLwPvmyiOmWerI+3ieXRvL4K7x.vOC9JXxjeT0x DSa5VlrqgIAqSeYddZo4FClsUojhfo0WSrcclHmqLWD1nU4V0QMmsv7Hjy96 eBFs+QXuS0+rgasjfYohkA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kVrmelq7UxCmU4+68pZsscgOvXl9UQXWtXbLkQPlO9pK0bjnW 8FjUAfvZpnaNcxoAH1X2S9stYjE6GxRiBoD192ozNN2NX6UPAZi4H0avmyfs 4ZsFavh7CXYDZ0LL6CZI3SR1d2jJn8cxQCOuP15p1gguKhYg9AsFfhCCYwv9 iYC6ir1jZJ57BY2UDA58PLqWnJhvBeUHH5jTE26FFZ2YIJ9LCWqecP3qHb0d mlJfe6u7ESOpuvaXcobaw7cy4Vuq9fFc4BdoJSruG+5q+BWZdWqxVrfKN.wq yVrQlIT0FxoVaqy11a61NLNx3XbTWLt3ww1HNAN54Zb5WdIUu6i0Qq1kgdvm XMEKN3CTyhPRRzOA8+6GOEOLdJJz5oTquU+SD3vOQBaRgC9zMlBwt.gylAVi butexAyBjz3GPQ8MFG5I2Ix0LK3MOyh4TV+HIWF5Tt.dTLNzgCWsaaIihok3 D1BGMr0qsoWP9HjKPc11t8bi4jFBabLNhSSOq2TK.41SNlSjabj3XNQNFcTL tHmpEgMN5u52WC.6TLGdbLNjSFGZbLNnSFGbbLN2jRFgXN2JVZbViTjSSsFc 8Yq5FpN8+eCQPgC -----------end_max5_patcher-----------
Edit: forgot to include the patch :S
from hover help file:
"The hover object does not output anything when the mouse is over objects that do not respond to mouse clicks. This includes the panel and comment objects as well as any object whose Ignore Click attribute is set. In addition, the hover object uses the front-to-back ordering of objects in a patcher to determine the top-most object under the mouse."
Forums > MaxMSP