Using Visual Logic or Scripting to change position and width of text object

I have a XPression Scene with a quad object on the left and a text object on the right. The scene is updated using template links through MOS Gateway in ENPS.
I want to use the visibility of the quad object to control the x position of the text object or group of text objects. I would also like the width of the bounding box to change based on either the quad object visibility or x position of the text.

I need to know how to do this using either visual logic or scripting

Thanks in advance. Any help appreciated.

This can be done easily with the Input Selector in Visual Logic. The Visible node will show 0 (quad is hidden) or 1 (quad is visible), connect this to the Index of the Input Selector node to have it select which value to use for the Output. As for changing the bounding box for the text, you’ll want to use the Autosqueeze Width node.

I’ll attach the project I made and a screenshot below:

Here is the file, attached the wrong one before…

Thanks so much for your help! I hadn’t used the input selector block before. That did it!

Is there a way to have whether the quad has a material or new material assigned to it control the text position, instead of the quad’s visibility?

I have the length of text string control similar adjustments on other objects. (0 string length as opposed to 1 or greater)

A material name will appear in the faces property of an object.

here I have tied it to a text object which would allow me to do pretty much whatever I want from there.