Return-Path: Received: from qmta08.emeryville.ca.mail.comcast.net ([76.96.30.80] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5371200 for ae-list@media-motion.tv; Sun, 09 Feb 2014 00:27:28 +0100 Received: from omta02.emeryville.ca.mail.comcast.net ([76.96.30.19]) by qmta08.emeryville.ca.mail.comcast.net with comcast id PzRg1n0030QkzPwA8zY3wi; Sat, 08 Feb 2014 23:32:03 +0000 Received: from HPZ200 ([24.10.59.135]) by omta02.emeryville.ca.mail.comcast.net with comcast id PzY21n0032v3gNo8NzY2i5; Sat, 08 Feb 2014 23:32:02 +0000 Message-ID: From: "Dan Ebberts" To: "After Effects Mail List" References: In-Reply-To: Subject: Re: [AE] Source Text from external file Date: Sat, 8 Feb 2014 15:32:04 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003B_01CF24E2.EB529360" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1391902323; bh=X9KjBds5A2OcT6TS5eHYeje1+lP49Eze6CSU5iQhaEk=; h=Received:Received:Message-ID:From:To:Subject:Date:MIME-Version: Content-Type; b=RDJsfFt+qmeBFyeUxpx42IuwbNBLzijijI9zLvUb+rjj5o88AfGeCwfPjYDnbGSJ0 kIwT3RL65qJl7c3cn2nFq2kSpO2lrhw6IMNLoDEEQYIWGMp1nKI65ge+k3mxAKGz4L ED78m/6V1hYDrT1z4ZwhrTJkpt2bc0q5E9fL1aYRZHMqX29755O9M9vUD0wrbvdgDR bhtAB3bbKEZOmE1v4kNnADt7DsMMJTbfXpM8A65oJG7IX68tnbQPV1xosb5Ifr9MZ3 JXhTlPos/srWpdbTlZECIWmWu9pn1tBtsxN1v3ZVAs+X2okHLlev8rcFr7cYELXZ2l 2D4zUdsGF+RSw== This is a multi-part message in MIME format. ------=_NextPart_000_003B_01CF24E2.EB529360 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable If all you have in the file is the text for the one text layer, I would = think this would work: myPath =3D "/C/temp/text_test.txt"; try{ $.evalFile (myPath); }catch (err){ "not found" } In the file you would have something like this: "This is my text." =20 (the straight quotes are necessary) Dan From: Phil Spitler=20 Sent: Saturday, February 08, 2014 3:16 PM To: After Effects Mail List=20 Subject: [AE] Source Text from external file I'm sure I have done this in the past and I know I can do it with a = script no problem but i would rather it be an expression.=20 There are plenty of examples on the web but they all seem to be = populating comps using an eval(comp.name) piece of code. I just want to have an expression on the source text of a layer that = will read the file and put it into that layer. Any ideas? Thanks. Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 m : 415.571.3139 Website | Facebook | LinkedIn ------=_NextPart_000_003B_01CF24E2.EB529360 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
If all you have in the file is the text for the one text layer, I = would=20 think this would work:
 
myPath =3D "/C/temp/text_test.txt";
try{
$.evalFile (myPath);
}catch (err){
  "not found"
}
 
In the file you would have something like this:
 
"This is my text."     
 
(the straight quotes are necessary)
 
Dan
 
Sent: Saturday, February 08, 2014 3:16 PM
Subject: [AE] Source Text from external = file
 
I'm=20 sure I have done this in the past and I know I can do it with a script = no=20 problem but i would rather it be an expression.=20
 
There are plenty of examples on the web but they all seem to be = populating=20 comps using an eval(comp.name) piece of code.
 
I just want to have an expression on the source text of a layer = that will=20 read the file and put it into that layer.
 
Any ideas?
 
 
Thanks.
 
Phil
 
Phil Spitler  = | =20 Creative Technologist   |  Bonfire Labs  = |  t :=20 415.394.8200  m : 415.571.3139

Website | Facebook | LinkedIn

 
------=_NextPart_000_003B_01CF24E2.EB529360--