hide/show UI elements
I’m working on a promotion software showing a live video (modified in realtime, like Apples Photo Booth) and some user interactions. My problem is that I want to change the UI in runtime.
Is it possible to hide and show UI Elements in runtime (especially pwindows and buttons)? If not, does anyone knows some useful Max Objects? Or are there some tricks to get to the same result (e. g. set the x or y position)?
I’m using Max 5.0.4 on Mac OS X 10.5.4. I hope someone can help me with this problem.
Thanks in advance…
look into scripting. it’s a very powerful tool.
one way of doing it would be something like this: (I think that’s what you were getting at)
----------begin_max5_patcher---------- 885.3ocuX0saaBCE9ZxSgEU6pkEgMXfrc0dAlzj1cSSU.wk3MvDANscsp6Ye 9Gf.IjFSIkKhAerCb99N+ZddgkcbwijJavmA+DXY87BKKkHo.q54V14QOljE Uo1lcRQdNgwsWpWiSdjqkusnnh.p1V7.nnDrktg.3aILPRFM4Of3HVZy+gsO mxxHb0CDVKjtQ8XJh+8mbgc1YwddyVcpkdWAiyhxIp+vWKoQYM6eWDOYKkkd aIIgqQEFuxYI.EnFg5KNqb.+pyCqh9j5gAQqbjReYwB4vRCoDF4AgZeBijFw I.zffFcJnQqGFzMaUKh+2cDMtrsWJ90CFFyInPIM.g9pKdyIo7Q.zXFIbXFA dNFgJbKmBgDnHBWzJ70mN3Qwl59ivsrVTbcrosLtRZwkwUG.Yehw80HlkWAO FLR6o37d3vDumyKXFSRtiz4Pk.pUeGBht3tX7.DudN+6ehBvF696XONqrNE6 gqSHbPSEAqkid9yX5gjhrLScAfmIio2qlwbZwAPrhMVqbOvquXlhZwUQ22nD 27M4qWiSf8WjC27C43cYQoUhafKEE55tBTaKg82ORbCuHMMibzBt0t.GI1Sb SUlH6Q4QKfaW.oWnELRsdysBpV.+ai37RpHFU2sfUqY0xljGSTVEnRfxQ3J4 NTsqTf76.UIkzcbcyEenxXGDuQliXZkS0AJPzbVN8HBR000HHH24gfpiZZYH 3LxP7szJkJQJMt1BZtaEC46Iu3eAWG3J7ZLLL3bYU5g0lX7uKGIrMMA2uApM eeFmpyQz.k6iJawXa1Cyn2fIwtCwgqUEpfgvCktgdu0Z2oQT1+NOLMt8U+QB yJZJKJ6jB2CgWemqHd622UW.WWEwLqJ952OVvIn7M2PltR4PfrsFpgmMcJmI YHT5Dd8PoPmhGNDU2+fgo+Foia8oK5aPGW8AOMIna3DOpiWn1icFkc7mwP8d jx6SXUE6KSZT8lCdCfsupMjJNkEwohXhCaRVoDbPeD0Y2PXc+lD4zM6JDLQs RbFy2nzImKoSdypNAMQmNhLunNA8wxdngPk6e2YSkACMUamQqJ1DcJbd0IG4 YItjm1H4IT.riUEgv5O2T2YgAcL3xISEGtlvsNyaDimI5DZb5jnpnjZ8UYL6 LYp5p66ft1DOGnc.zeUg9yPdqO.D0jd.QL4kE+2snzRg -----------end_max5_patcher-----------
that looks great! I think your example shows exactly what I need. Thank you!
On 8 sept. 08, at 11:03, Al Dhanab wrote:
> that looks great! I think your example shows exactly what I need.
> Thank you!
You may also want to have a look to Bpatcher, which is a great way of
grouping UI elements together, in order to control them as one.
yes I tried that but I had problems with switching to the presentation mode because the included bpatcher objects itself won’t change to presentation mode. Perhaps I need more practice to use it correctly.
I searched the Max help but I couldn’t find descriptions about the powerful scripting functionality. Where do I find tutorials or a syntax reference? Has anyone experiences with that?
Thanks a lot…
On 8 sept. 08, at 12:02, Al Dhanab wrote:
> Hi EJ,
> yes I tried that but I had problems with switching to the
> presentation mode because the included bpatcher objects itself won’t
> change to presentation mode. Perhaps I need more practice to use it
You need to check "Open in Presentation" option in the bpatcher’s
> I searched the Max help but I couldn’t find descriptions about the
> powerful scripting functionality. Where do I find tutorials or a
> syntax reference? Has anyone experiences with that?
thispatcher help file is the first place to look at. There’s a few
examples flying around in the examples folder of Max I think. In the
online tutorial about pluggo->poly~ there’s also some examples:
yep, you can show/hide any UI object, and resize many of them, by scripting commands to thispatcher. If you’re going to have a long row of similar elements to control, such as a row of 8 faders, give the first one a scripting name like
Then when you duplicate by alt-dragging (or option-drag on Mac), the new ones will automatically be
etc. Then you can tell them to all hide/show at once: uzi right outlet–>sprintf script show fader[%ld] –>thispatcher
[%ld] becomes the # that the uzi sends out.
I often use show/hide for optimization, like if I have multisliders that are displaying information. Seems to help somewhat, though probably gating the data would be better.