How do I know Text's width ?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
wing586
Posts: 2
Joined: September 25th, 2012, 2:59 am

How do I know Text's width in Script Code ?

app.project.activeItem.layer(1).property("ADBE Text Properties").width ???

app.project.activeItem.layer(1).property("ADBE Text Properties").property("ADBE Text Document").width ????

I really want to know...
Attachments
2012-10-02  12.20.43.png
2012-10-02 12.20.43.png (22.94 KiB) Viewed 8412 times
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Check out the sourceRectAtTime method in the scripting guide.

Code: Select all

var bounds = app.project.activeItem.layer(1).sourceRectAtTime(activeItem.time, true);
alert("top = " + bounds.top + "\rleft = " + bounds.left + "\rheight = " + bounds.height + "\rwidth = " + bounds.width);
wing586
Posts: 2
Joined: September 25th, 2012, 2:59 am

Paul Tuersley wrote:Check out the sourceRectAtTime method in the scripting guide.

Code: Select all

var bounds = app.project.activeItem.layer(1).sourceRectAtTime(activeItem.time, true);
alert("top = " + bounds.top + "\rleft = " + bounds.left + "\rheight = " + bounds.height + "\rwidth = " + bounds.width);
Oh, Thank you for your kindness.
Post Reply