Adding an expression to Source Text breaks alignment?

This is a big WTF for me.
I have a text layer. I center-align the text in it. The moment I add an expression to its Source Text (even the default text.sourceText) it becomes left-aligned and REFUSES to go to center-aligned. Huh?! This seems like a very common thing, so what am I missing? Is there something else I need to do in the expression to get it to be center aligned?
Thanks!

I use this expression:
type = text.sourceText;
m = thisComp.marker.nearestKey(time);
sentences = type.split("\r");
n = m.index;
if (time < thisComp.marker.nearestKey(time).time) {n = n-1}
if (n>=sentences.length){n=sentences.length-1}
if (n<1){n=1}
line = sentences[n];
line
When I edit the text, it's perfectly aligned, but when the text gets split up by the expression, everything aligns to the left.
Hope you have an idea why?

Similar Messages

  • Linking source text property in AE CS6 to external text document

    Hi,
    I would like to load text from an external .txt file into the Source Text property. I've seen multiple ways to do this around the web, but it seems like it's changed in CS6. (All the examples I've found are for CS4 or CS5.)
    I'm on a macbook pro. The .txt file (data.txt) is on the desktop.
    This is what I've tried to map into the Source Text property:
    1)
    myPath = "/data.txt"; try{ $.evalFile (myPath); eval(thisComp.name); }catch (err){ "not found" }
    Here I get "not found".
    2)
    myPath = "/c/data.txt"; $.evalFile(myPath)
    Here I get the error: "File or folder does not exist".
    The name of my comp is "sc100" and the text file says:
    sc100 = "My Text"; ;
    Is there a proper way to do this in CS6? Or am I just doing it wrong?
    - KolibriEirik

    I've been trying the entire afternoon with this expression and also Harry Frank's and haven't been able to make it work, I even imported an old project where it worked fine and in that comp it still does, but the new one doesn't. I moved the data file to the location where I have the one for the old project and I was able to make it work, however I can't leave it there becasue I'm doing this project in a different machine,
    This are the expressions that I have tried so far:
    myPath = ~/Desktop/combinedcaptions.txt
    try{
    $.evalFile (myPath);
    eval(thisComp.name);
    }catch (err){
    "not found"
    try
    myPath="~/Desktop/captions.txt";
    $eval(thisComp.name)[0];
    catch
    (err)
    "missing"
    if ($.os.indexOf("Mac") != -1)
    myPath = "/Volumes/750GB/Mount Sinai_Carousel_David/Expressions/";
    else
    myPath = "file://c:\\\\Expressions\\";
    myPath += "CombinedCaptions.txt";
    $.evalFile (myPath);
    eval(thisComp.name)[0];
    Only the third one worked, but just as long I placed it in a different directory, which I can't.
    Can anyone help? I'm due to deliver over a 100 captions tomorrow.

  • Layer Source Text linking to external text. (no code in doc!)

    I've seen linking to text documents with code snippets in it.
    So that means the external text document must contain bits of scripting.
    I would like to link to txt documents (or csv) that do not contain code.
    Total noob users must be able to link a text to a After Effects project.
    I have a website data catcher which exports CSV values.
    It would be ideal if After Effects can hoover up the text and put certain pieces into certain source texts.
    We're talking automated sports cards here.
    Is this possible without adding code to a text dump?
    Or is this just impossible?

    The basic idea is to use something like this:
    myPath = "/c/test/txt.txt";
    $.evalFile (myPath);
    The text file does need to contain legal JavaScript code, but it could be as simple as this for a text layer:
    "this is a test"
    You generally want to wrap the $.evalFile() in a try/catch so that you can have an error string like "Not found." display if your path is bad, like this:
    myPath = "/c/badpath/txt.txt";
    try{
      $.evalFile (myPath);
    }catch(err){
      "Not found."
    Dan

  • [svn] 4320: Adding further skeleton of source tree for fxgutils.

    Revision: 4320
    Author: [email protected]
    Date: 2008-12-15 18:14:14 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Adding further skeleton of source tree for fxgutils.
    QE: No
    Doc: No
    Added Paths:
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/fills/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/filters/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/stokes/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/text/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/transforms/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/types/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/sax/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/swf/

    Revision: 4320
    Author: [email protected]
    Date: 2008-12-15 18:14:14 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Adding further skeleton of source tree for fxgutils.
    QE: No
    Doc: No
    Added Paths:
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/fills/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/filters/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/stokes/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/text/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/transforms/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/dom/types/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/sax/
    flex/sdk/trunk/modules/fxgutils/src/java/flash/fxg/swf/

  • Cross references not picking up character styles in source text

    I'm getting some annoying odd behaviour with cross references in Frame 12.
    I have some tables, where the paragraph style in the cell is called "Cell Body" (nothing odd there).
    Quite a few of the cells only have one word in them, and that word is set to courier font with a character style (called "Code").
    Then, elsewhere in the document, I am referring to this text using cross references. I am referencing the paragraph style Cell Body, and the cross reference format applied is like this "<hyperlink><$paratext><Default ¶ Font>"
    "hyperlink" is another character style that makes the text go green.
    So, the cross reference out to take the text from the cell (in Courier) and reproduce it, coloured green.
    However for about half of these cross references, it isn't picking up the Code character style in the source text, so the cross ref is just green, no green courier.
    Things are further bamboozled when I output to HTML Help.
    In the CHM file, the cross refs which appear to work OK (green courier) are now just courier.
    The ones which failed to pick up the courier look the same as they do in Frame (just green).
    Any ideas as to what's going on?
    I've tried troubleshooting by clearing the cells, reapplying the para style and default character style, then reapplying the code character style, then replacing the cross reference - which sometimes seemed to fix it but didn't always.

    Arnis Gubins wrote:
    Using two character tags in-line together (a la <hyperlink><Code>) is asking for trouble. IIRC, FM doesn't re-apply these in order on an update and depending upon how they are defined (and what is set to AsIs), the outer one usually wins. .
    So why does the blimmin' dialog invite me to do precisely that, by providing me with a list of all the character styles I have, and allowing me to select as many of them as I like??? /sulks/   Indeed, if Frame still shipped with a printed user guide instead of  stupid "optimised for viewing on iPhones" online webhelp nonsense, I suspect I might very well be able to find an example in the manual of using multiple character styles in that dialog!  If it doesn't want you to use more than one, why doesn't it grey out after you add the first one? /sighs/  The concept is called "cascading styles", it's a fundamental web paradigm! And it works in the main body text - why not in Xrefs!
    Also, I have been very scrupulous to keep my character styles orthogonal so none of their AsIs's mash each other up.
    But, rant over, I shall follow your splendid suggestion for a "Code Hyperlink" style.
    Arnis Gubins wrote:
    Also, x-ref formatting may behave differently in the new Publishing modules depending upon ....
    ...Depending on how badly designed and buggy this new Frame12 feature is, I should say!   The Publish module should not randomly stop behaving in a WYSIWIG manner in completely undocumented fashion just because Adobe couldn't be bothered to code it properly.  /sighs/
    Frankly, for my current project, I've given up trying to jump through hoops for Publish - I'm concentrating on getting the Frame source right and assuming these quirks will be fixed in Frame 13 (or 14, depending on how superstitious they are). Because if I put in ad hoc workarounds for them in Frame 12, I (or a colleague) will only have to undo them later when they're fixed, and by then we'll all have forgotten what the original problem was.

  • I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info in apps) and reverted back to all my old data.  How can I retrieve all the lost data??

    I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info added to apps) and reverted back to all my old data (literally uploaded all of my old texts and 1400 old pics and deleted anything new).  How can I retrieve all the lost data?? Please help!!

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • Message Mapping- Source text view not working

    HI friends,
    in my idoc to file ,
    in message mapping testing (static testing),
    i given values for sourse message and i executed test and the values are populating in target message.in target meesge if want to view of xml using source text view then..
    i am getting follwing ..
    <?xml version="1.0" encoding="UTF-8"?>
    i am not getting full data in xml format..
    please guide me...
    regards
    Munna

    Hi Munna,
    The solution was the use of Pretty Print.
    Double Click on the "Source Text View". You will get an icon of Pretty Print on the side. Click on it. The whole XML will be displayed.
    Regards,
    Venkatesh
    Message was edited by:
            Venkatesh Ramachandran

  • New Safari 2.0.3 displays some Router Firmware pages as HTML Source text

      Hello Safari users and gurus.
    I installed the new 10.4.4 Combo Updater yesterday, preceded and followed by permissions repairs and other maintenance, including cleaning Safari Caches. Safari 2.0.3 works.
    My problem: 10.4.4's new Safari 2.0.3 displays HTML source text after I click "Save" from within my Linksys (latest firmware) router's web based administration pages that worked correctly with the previous version of Safari.
    When I check or change my router settings, the initial router settings pages appear as they did with the previous version of Safari. However, with 10.4.4's new Safari 2.0.3, as soon as I click "Save" to attempt to save a changed router setting, the confirming info from the router is displayed as HTML source code instead of the expected HTML page display.
    If I wait for the router lights to indicate activity has ceased and then reload the router's opening admin address, the page opens again normally, and I can navigate to other pages and see that the changes have been saved. However, any click on any "Save" changes button in the router's pages delivers another page of HTML source text.
    I will watch for future router firmware updates to see whether the issue is resolved from the Linksys side.
    Does anyone have any suggestions for improvement now? All assistance will be appreciated.
    EZ Jim

     Thanks glefand. As you suggested, I tried my old iBook G3 that is still running 10.3.9, and it works fine for me.
    My G5 DP also worked normally up through OS X 10.4.3. My problem only began after I installed the 10.4.4 update. I think the Safari update included with the 10.4.4 update is what is causing the issue with the firmware pages on my Linksys router.
    Hopefully a future router firmware update (or Safari update?) will restore proper operation. If not, I will continue to reload from the router's Start page. The need to work around this glitch is annoying, but the actual function of my router setup works without problem, even though the pages do not display properly.
    Thanks again for your helpful suggestion,
    Jim
    G5 DP 1.8, 4.5G RAM, 2x160GB Seagate, 1,000va UPS   Mac OS X (10.4.4)   20"ACD, iSight, AirportCard, Klipsch GMX A-2.1 Audio

  • Decode statement in a mapping involve Source Text File & Table.

    Hi All,
    Oracle 9i Warehouse Builder Client: 9.2.0.4.0
    Oracle 9i Warehouse Builder Repository: 9.2.0.2.0
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    Does OWB allow to use Decode statement in a mapping involves Source Text File and Oracle Table.
    My understanding is it's not possible, since OWB makes use of Sqlloader. For this work arround could be make use of External Table instead of Text Flat File.
    However I came across an old posting (June-2003) which says that this feature is available OWB 9.2.
    Following is the url:
    IF THEN LOGIC from Flat File to Table
    Can someone please confirm this?
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi all,
    If you want to validate correctly this mapping you must to :
    1. Right click on the mapping, then Configure
    2. Right click on Sql Loader Data Files, then Create
    3. Verify that the location name is correct and complete the Data File Name
    4. OK
    The validation is now OK.
    I hope it will be help you
    Best Regards
    Samy

  • How to create empty text file on target system for empty source text file

    Hi All,
    I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
    Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs.
    But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
    Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
    Thanks in Advance....
    Regards
    Sreeni

    >
    Sreenivasulu Reddy jonnavarapu wrote:
    > Hi All,
    >
    > I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
    > Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs.
    >
    > But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
    >
    > Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
    >
    > Thanks in Advance....
    >
    > Regards
    > Sreeni
    the problem is that when there is an empty file there is no XML for parsing available. Hence in case you are using a mapping it will fail.
    What ideally you should do is to have a module that will check if the file is empty and if so write out an XML as you want with no values in the content/fields.
    Or the next choice would be to have a java mapping to handle this requirement. I guess that on an empty file the java mapping will go to an exception which you can handle to write out your logic/processing

  • Grouping & Back-references with regular expressions on Replace Text window

    I really appreciate the inclusion of the Regular Expressions in the search & replace feature. One thing I am missing is back-references in the replacement expression. For instance, in the unix tools vi or sed, I might do something like this:
    s/\(firstPart\) \(secondPart\) \(oldThirdPart\)/\2 \1 newThirdPart/g
    which would allow me to switch the places of firstPart and secondPart, and totally replace thirdPart. If grouping and back-references are already present in the Replace Text window, how does one correctly invoke them?

    duplicate of Grouping & Back-references with regular expressions on Replace Text window

  • Deleted the recently added section from the source area how can i add back

    how can i add back the recently added section from the source without reinstalling itunes thanks in advance....
    insp 8100   Windows XP  

    Ok that is easy.
    1) File > New Smart Playlist.
    2) Make sure match the following rule is checked
    3)The first drop down change to date added.
    4)Set the second drop down setting
    5) Enter the number you want based on step 4
    The rest of the check marks are up to you but make sure "Live Updating" is checked.
    Take some time playing around with the smartlists. I love them!! I have a 2 level smartlist at work, I hardly use the regular playlists.

  • Errors trying to apply a Boolean expression for conditional text

    I have been trying to create some Boolean expressions to filter conditional text, with mixed results. The Boolean expression is three conditions separated by ORs followed by four conditions preceded by AND NOTs. When I apply the expression, FrameMaker exhibits and error and has to quit. The numbers in the error message are:
    9004, 4908044, 6134440, 5459515
    The hidden log file appears to be nothing more than a stack dump.
    Do the numbers listed above indicate anything?
    Are there any known limitations on how long a Boolean expression can or should be? One expression with one fewer OR worked.
    Does there need to be a space between an AND and a NOT? The builder does add one, so I assume it is not necessary.
    Does anyone have some general rules of thumb when working with Boolean expressions for conditional text?
    Thanks,
    Van

    Van,
    The error values are meaningless to users. However, please do send the logfiles to the [email protected] address.
    As far as conditionals go, the general rules are that conditon names must be quoted and that if your ar using the NOT, it must run together with the AND or OR, e.g. ANDNOT ORNOT.
    There's an articel in the Developer Connection on using the boolean operators at http://www.adobe.com/devnet/framemaker/articles/fm8_single_sourcing.html
    Perhaps if you posted the condition that caused the crash, someone might be able to spot an error.

  • Need a regular expression for the text field

    Hi ,
    I need a regular expression for a text filed.
    if the value is alphanumeric then min 3 char shud be there
    and if the value is numeric then no limit of chars in that field.[0-9].
    Any help is appriciated...
    thanks
    bharathi.

    Try the following in the change event:
    r=/^[a-z]{1,3}$|^\d+$/i;
    if (!r.test(xfa.event.newText))
    xfa.event.change="";
    Kyle

  • Regular expression vs oracle text performance

    Does anyone have experience with comparig performance of regular expression vs oracle text?
    We need to implement a text search on a large volume table, 100K-500K rows.
    The select stmt will select from a VL, a view joining 2 tables, B and _TL.
    We need to search 2 text columns from this _VL view.
    Using regex seems less complex, but the deciding factor is of course performace.
    Would oracle text search perform better than regular expression in general?
    Thanks,
    Margaret

    Hi Dominc,
    Thanks, we'll try both...
    Would you be able to validate our code to create the multi-table index:
    CREATE OR REPLACE PACKAGE requirements_util AS
    PROCEDURE concat_columns(i_rowid IN ROWID, io_text IN OUT NOCOPY VARCHAR2);
    END requirements_util;
    CREATE OR REPLACE PACKAGE BODY requirements_util AS
    PROCEDURE concat_columns(i_rowid IN ROWID, io_text IN OUT NOCOPY VARCHAR2)
    AS
    tl_req pjt_requirements_tl%ROWTYPE;
    b_req pjt_requirements_b%ROWTYPE;
    CURSOR cur_req_name (i_rqmt_id IN pjt_requirements_tl.rqmt_id%TYPE) IS
    SELECT rqmt_name FROM pjt_requirements_tl
    WHERE rqmt_id = i_rqmt_id;
    PROCEDURE add_piece(i_add_str IN VARCHAR2) IS
    lx_too_big EXCEPTION;
    PRAGMA EXCEPTION_INIT(lx_too_big, -6502);
    BEGIN
    io_text := io_text||' '||i_add_str;
    EXCEPTION WHEN lx_too_big THEN NULL; -- silently don't add the string.
    END add_piece;
    BEGIN
         BEGIN
              SELECT * INTO b_req FROM pjt_requirements_b WHERE ROWID = i_rowid;
              EXCEPTION
              WHEN NO DATA_FOUND THEN
              RETURN;
         END;
         add_piece(b_req.req_code);
         FOR tl_req IN cur_req_name(b_req.rqmt_id) LOOP
         add_piece(tl_req.rqmt_name);
    END concat_columns;
    END requirements_util;
    EXEC ctx_ddl.drop_section_group('rqmt_sectioner');
    EXEC ctx_ddl.drop_preference('rqmt_user_ds');
    BEGIN
    ctx_ddl.create_preference('rqmt_user_ds', 'USER_DATASTORE');
    ctx_ddl.set_attribute('rqmt_user_ds', 'procedure', sys_context('userenv','current_schema')||'.'||'requirements_util.concat_columns');
    ctx_ddl.set_attribute('rqmt_user_ds', 'output_type', 'VARCHAR2');
    END;
    CREATE INDEX rqmt_cidx ON pjt_requirements_b(req_code)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('DATASTORE rqmt_user_ds
    SYNC (ON COMMIT)');

Maybe you are looking for

  • Wrt1900AC and parental control

    Does anybody have parental control on Linksys Wrt1900AC working correctly? If so, please let me know how you did it? I spent 2+ hours with tech support and ended up replacing the router at their advise just to find out that the new one does EXACTLY t

  • Adobe Reader X - Firefox integration Problem

    Dear All, My first post here. I am having problem's with the Adobe Reader X integration with Firefox (v3.6.12). I have been using Adobe Reader always and it's been fine. But I installed the new Adobe Reader X, and it integrates with firefox well, PDF

  • Music from my iPod to my computer

    Within the past few months I have had to reformat my comp for various reasons. Whether it was time for another one or a virus breaching through my router. But I need to know if I can somehow transfer all of my songs and info back from my iPod back on

  • Uninstall/Reinstall

    I was running an update in my Ipod Nano the other evening and got the "Do not disconnect" screen come up on the Ipod. After showing this message for ages I decided to do the opposite and disconnect it. Now every time I connect the Ipod to Itunes I ge

  • Catch-22 authorizing computer

    When I sync my Iphone (Iphone 4, ios 6.01), Itunes (11) tells me that there are 26 apps that it can't transfer because I'm not authorized on this computer. (there are a whole bunch of others that it transfers OK). When I try to authorize it, it then