From: "Robert Kjettrup" Received: from mail-lf0-f53.google.com ([209.85.215.53] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7111990 for AE-List@media-motion.tv; Fri, 06 Jul 2018 12:59:09 +0200 Received: by mail-lf0-f53.google.com with SMTP id j8-v6so9489555lfb.4 for ; Fri, 06 Jul 2018 04:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=oIefnaZy8LxbEWa48ygYZQtZ+tDLdWDT+0H5HqGiHTY=; b=fithu60362l5nrxEDZilS4VdGOKguTuX/62hcszjHCGht+nflRwjGZ6bPCIqxHOMbk Z4mT5+yGva2krPXd1mZ/i2830oJoCUChuDFV00Eb8riKntNICx0crnTDiGxuIxqBXbKx bi0haRF8tGApoJW0gorefioKd+AjT/lJ6r+PMc9tCU27P6iYJMeLt15gFey4QbBfmYgj O3BB3Mtaj46bafd0w5XutzP8KwRnrI/wGjRslQBAJl3TUmElMFe8VL+gGLpIvoH6yfPf TOdV4XkgvWswsP0/7r+pGjxFv0HdGqnCmkyCIv6ujahWp3nt1SQ/P8OjEVBuBBmrj8ui dwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=oIefnaZy8LxbEWa48ygYZQtZ+tDLdWDT+0H5HqGiHTY=; b=cChm06fpbMLYRMHN7bdKrJJ/vuOT6I3J4ZMWx5/FoU0myzXwKD2fmcciGwkV2Ke2pl h1I3hJRz0LebcRNylWzsl18rG1ZKMTQD/LzzatNc6RNTw1J60kjtn/kcyJOiEcMs9CQp jkz4jVIFchuRQfXfIUGtxbuDtnO+quMzQ2pvqo5TKbAvBBHMfTIVIyGI4uQ7PhwKiXNM Iz41e9zCJBsvtH7gOuw0uVRQyLeHof+/xnG8kWqQN0y8hlWOJcjaKpXciWkyS4rXQDQC Q9O8bEKvIpY/Ko/Xr++wYofqgbzD4nUGaopU842YqdWWlVcWVBaghtxlzSwuF/Qd5cg1 QE1g== X-Gm-Message-State: APt69E1rv3IJ/gyE6YkR1j/Y+nFHaTE39uoWU6ubfcndaKlxmrQItXGO 7HtRRliPu/N3vJouHBUY9IlpF8BjerMS5VKKEW1QNQ== X-Google-Smtp-Source: AAOMgpdgkz+BUWT99WUY9sUMmSD/nlClH39p8mSICchR/uxbKhXGor2ssCnXfzCW4ATTKUcHs6fLt1H7THBBEJ3z0tw= X-Received: by 2002:a19:b2c7:: with SMTP id t68-v6mr6863629lfk.132.1530875245054; Fri, 06 Jul 2018 04:07:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:2405:0:0:0:0:0 with HTTP; Fri, 6 Jul 2018 04:07:24 -0700 (PDT) Date: Fri, 6 Jul 2018 13:07:24 +0200 Message-ID: Subject: Try Catch expression To: After Effects Mail List Content-Type: multipart/alternative; boundary="0000000000002d500e057052ab4a" --0000000000002d500e057052ab4a Content-Type: text/plain; charset="UTF-8" Hi im using .charCodeAt() to get a Unicode value from a textlayer to timeremap a precomp, this is working great to use custom graphics to type out words. But im having a small problem with AE giving me an expression error if i use the charCodeAt() to read from a chararcter there is higher than the length of the textstrring of the text layer This error is not really problematic since it renders fine.... but now that i have set up a larger project i have the expression warning banner tell me about 55 errors, and that is quite annoying. Now im trying to use the Try Catch to get AE to ignore this error and not return a warning for each layer that has this expression reading outside the length of a textstring... but i cant get it to work. What am i doing wrong. the setup is as follows: a precomp with a bitmat characters setup at framenumbers that match the Unicode value that .charCodeAt() returns. This expression on the TimeRemap property of each copy of the character comp, this is character 3, aka copy 3 of this comp: txtVal = thisComp.layer("ab").text.sourceText; fps = 1/thisComp.frameDuration; Ch = 3; txtVal.charCodeAt(Ch-1)/fps And the Try/Catch method i cant get to work txtVal = thisComp.layer("ab").text.sourceText; fps = 1/thisComp.frameDuration; Ch = 3; try { txtVal.charCodeAt(Ch-1)/fps } catch(err) { 0 } and a link to a screengrab of a simplified version of my setup: https://adobe.ly/2NtbdHv --0000000000002d500e057052ab4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

im using .charCodeAt() to = get a Unicode value from a textlayer to timeremap a precomp, this is workin= g great to use custom graphics to type out words.

But im having a small problem with AE giving me an express= ion error if i use the charCodeAt() to read from a chararcter there is high= er than the length of the textstrring of the text layer


This error is not really problematic since it renders fine.... b= ut now that i have set up a larger project i have the expression warning ba= nner tell me about 55 errors, and that is quite annoying.

Now im trying to use the Try Catch= to get AE to ignore this error and not return a warning for each layer tha= t has this expression reading outside the length of a textstring... but i c= ant get it to work.
What am i doing wrong.

the setup= is as follows:
a precomp with a = bitmat characters setup at framenumbers that match the Unicode value that .= charCodeAt() returns.

This expres= sion on the TimeRemap property of each copy of the character comp, this is = character 3, aka copy 3 of this comp:


txtV= al =3D thisComp.layer("ab").text.sourceText;
fps = =3D 1/thisComp.frameDuration;
Ch =3D 3;
txtVal.charCode= At(Ch-1)/fps
=

And the Try/Catch method i c= ant get to work=C2=A0

txtVal= =3D thisComp.layer("ab").text.sourceText;
fps =3D= 1/thisComp.frameDuration;
Ch =3D 3;
try { txtVal.charC= odeAt(Ch-1)/fps } catch(err) { 0 }



and a link to a scre= engrab of a simplified version of my setup:
https://adobe.ly/2NtbdHv
--0000000000002d500e057052ab4a--