-
Making Titles that Automatically Adjust due to string length.
I’ve made my title and if the name is 20 characters the box will automatically adjust using the code below for the size & position. All text is left aligned. Success! it worked!
Now I’m re-making the titles so they can be right aligned for titles on the right side of the screen. All text is right aligned and I’m running into a problem(See Right Aligned Text) So how would I change the code so that when text is typed, the “blueRectangle” shape layer moves to the left instead of the right?
Right Aligned Text:

Here’s the left aligned text that works:

Hope this makes sense. I’m no coder & any help would be much appreciated. Thx Chris
Expressions Used for the "content" of rectangle 1SIZE:
s =thisComp.layer("NAME_HERE");
x = s.sourceRectAtTime(time-s.inPoint,true).width;
y = s.sourceRectAtTime(time-s.inPoint,true).height;
[x,y]POSITION:
content("Rectangle 1").content("Rectangle Path 1").size/2