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...
How do I know Text's width ?
Moderator: 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);
Oh, Thank you for your kindness.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);