AE ENHANCERS

Expressions/Scripts/Presets
It is currently Wed May 22, 2013 2:01 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How do I know Text's width ?
PostPosted: Mon Oct 01, 2012 8:25 pm 
Offline

Joined: Tue Sep 25, 2012 2:59 am
Posts: 2
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 481 times ]
Top
 Profile  
 
 Post subject: Re: How do I know Text's width ?
PostPosted: Wed Oct 03, 2012 1:54 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 646
Location: London, UK
Check out the sourceRectAtTime method in the scripting guide.
Code:
var bounds = app.project.activeItem.layer(1).sourceRectAtTime(activeItem.time, true);
alert("top = " + bounds.top + "\rleft = " + bounds.left + "\rheight = " + bounds.height + "\rwidth = " + bounds.width);


Top
 Profile  
 
 Post subject: Re: How do I know Text's width ?
PostPosted: Sat Oct 06, 2012 7:56 am 
Offline

Joined: Tue Sep 25, 2012 2:59 am
Posts: 2
Paul Tuersley wrote:
Check out the sourceRectAtTime method in the scripting guide.
Code:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group