Collect footage breaks links to layers within PSD

I have a project which was built by creating a series of layered Photoshop storyboard files for approval, then importing the PSDs as comps, making the text layers live text and then animating.
With the project complete I'm now trying to collect all of the component parts so I can archive it but I'm having a problem with the collect files function. If I look in the collected folder, the required PSD files are in place, but within the collected project file all of the individual layers references are still linked to the original files -- so if I rename the original master folder and open the collected project, it complains of a large number of missing items.
Is this a bug? Is there some part of the process I'm missing, or is this just how the collect footage function works with layered PSDs and I have to manually relink the layers each time?
Cheers,
Keith

Szalam, this is unlikely to be the same problem as the Mac OS event handler issue we are seeing with Collect Files, where not moving the mouse avoids an event collision. In that case the user should receive an error message that makes the problem very obvious. Doesn't sound to be the case here.
TheAnorak, best thing at this point would be for you to post a project (before collecting) and at least one PSD file that we could try to repro the problem with. Screenshots of the Project panel of the before and after states, the Collect Files dialog, and the resulting collected files would also be useful.
My suspicion is that you are encountering some unexpected condition that Collect Files doesn't account for, but we don't yet know the full condition of your project.

Similar Messages

  • Breaking Links to and External Data Connection using the cubevalue() function

    I have spreadsheets that connect to an MSAS cube successfully and pull data in the cells using the CUBEVALUE function.
    Is there a way to perform the equivalent of 'breaking links' to the external database so that the spreadsheet can be distibuted to others that will not have the external database connection set up on their computer/excel environment.
    I find that if i email a spreadsheet with data retreived using cubevalue functions to someone without the external database connection they do not see the values preserved with the spreadsheet and end up with blank or zero cells, etc.
    I have unchecked the box related to 'refresh data when opening file'.
    In a perfect world i would like to remove the db connection and be left with pasted values, similar to breaking links to an external workbook but I am not sure if that is possible.
    I am desperate to find a way to distribute these spreadsheets and be confident that Excel won't be unsuccessfully trying to refresh a connection that isn't on other peoples computer.
    Thanks for any guidance

    Maybe you can upload a sample file to a file sharing site and then share the link with us.
    As you said you have already unchecked the option 'Refresh data when opening the file' within Connection Properties.
    When you send the Excel file to someone without this data connection, they should get the correctly data unless they click the button 'Refresh All'.
    Wind Zhang
    TechNet Community Support

  • Break Link - Symbols Issue

    My issue is with "Break Link" in CS5 Mac
    It currently breaks the symbol into a new layer inside the current layer instead of just making it a group inside current layer like it use to.
    I found the symbols feature really handy in teh previous versions. I do a lot of licensed artwork so I use the same logos repeatedly through out the day and it was nice to jsut have them in a symbol library so I could just drop what I needed of licensee's logos. Now this is more of a hassle with the current set up now and has added time to my old work flow.
    Any solutions other than converting back to CS4, I do feel this is a bug currently.

    Thanks for the response!
    I was a afraid that was the case. I'm not sure the advantage of the new setup. I have actually found a semi ok work around to the problem that stops it form making new layers in layers.
    If you drop your symbol to stage select it then group just the symbol then break it apart it will remain on the same layer, you may just get a group in a group. Which to me isn't as big of a issue as having art on different layers inside layers...

  • Sub-layer created when breaking link to symbol bad idea?

    When breaking the link to a symbol the contents is put into a sub-layer. I see no value in this and I am constantly disposing of the new layer. If it were a group it would be simple because groups don't exist without content, but layers must be deleted. Does anyone else have this grip or can you convince me this is a great new idea? I'm pretty sure this did not happen in CS4.

    For those frustrated by this issue, Cense posted a good workaround:
    http://forums.adobe.com/thread/684879?tstart=0
    Just group the symbol before breaking link and when you "break link" the resulting artwork is a nested group instead of a sub-layer.  No more useless layer to deal with.

  • [JS CS3] JS method for Object Styles Break Link to Style

    I have pages full of objects that are assigned the pesky "Basic Graphics Frame" object style. I need to do the equivalent of choosing "Break Link to Style" in the Object Styles panel on all the objects in many files.
    I haven't been able to find anything equivalent to the "Break Link to Style" functionality in looking through the Object Browser. Finding all objects with [Basic Graphics Frame] object style and applying an object style of [None] doesn't do the same result. Any ideas?

    hi:
    //FindObjectPreference
    myDoc = app.documents[0];
    app.findObjectPreferences = NothingEnum.nothing;
    app.changeObjectPreferences = NothingEnum.nothing;
    app.findChangeObjectOptions.properties =
      objectType: ObjectTypes.allFramesType, //graphicFramesType, textFramesType, unassignedFramesType
      includeFootnotes: true,
      includeHiddenLayers: true,
      includeLockedLayersForFind: true,
      includeLockedStoriesForFind: true,
      includeMasterPages:true
    //var graphicOStyleName = "[Normal Graphics Frame]";
    app.findObjectPreferences.appliedObjectStyles = myDoc.objectStyles.item(1);
    var dstStyle = myDoc.objectStyles.item(0);
    var founds = myDoc.findObject(0);
    var foundsLen = founds.length, i, found;
    for(i = 0; foundsLen > i ; i++){
      //app.select(founds[i]); alert(founds[i].appliedObjectStyle.name);
      founds[i].applyObjectStyle(dstStyle, false, false);
    <pre>
    jxswm

  • [JS][CS3] Break Link to Style

    Hello everyone.
    A while back ago I wrote a script to Brake Links to Paragraph Styles and Character Styles. That was easy since you can set to false the option "Clearing Overrides" when applying "No Paragraph Style" [0] or "None" [0]. But I cannot do such a thing with objectStyles "None" [0] even when setting the options to False. Every time the TextFrames get the ObjectStyle "None". And the GUI Palette is not showing a "+" as being modified.
    It does work when using "Break Link to Style" in the GUI.
    Any help would be appreciated...
    Alex.

    CTC Imaging wrote:
    Yes I did think of that solution, but I am trying to keep it clean. Especially if you are doing several document input as copy and pasting into a single document. Since I am trying to doing this automaticaly (The script is assigned to the COPY command through eventListener), if I choose ONE generic name to rename to, I will run into the same issue. Of course I could scan the DESTINATION document for that GENERIC names and add a prefix (counter) to the one I am going to rename in the ORIGINAL document. But It would not work if the DESTINATION document is not open YET! And I can't do it as PASTE because I have to copy with the correct naming FIRST.
    So the best option is to break the link. So how can I emulate "Break Link to Style" in the ObjectStyles menu from the GUI???
    Alex.
    Then you should add Date&Time at the end of name of current Char/Para/Object/Cell/TableStyle
    "MyHeaderStyle" -> "MyHeaderStyle(2010-01-04 16:12:35)"
    I don't think that you can do this TWICE in the same second in two different documents I've done something like that in one of my script and I've added 2 second extra loop to be sure that "random" name can't be duplicated
    robin
    www.adobescripts.co.uk

  • Text layers from PSD is converted as images when imported to Muse

    I want to import text layers from PSD files into Muse as text and not as images. Currently when I insert the text layers, they are converted into images. Is there a way to do this?

    Hi Jeffree, I have lot of content in my page and I need the same exact position of the text in my page. I am trying to automate it so that I can avoid copy paste error. Is there a way to make the psd text layer import to export as text in MUSE?
    Appreciate your help.

  • Why am I unable to select layers within the layout window - PSE13

    I am working on a project in expert mode. It has several layers. Randomly, I am now unable to select any of the layers within the layout window. I have tried to drag or click on or over an element and nothing happens, it keeps selecting the same element unless I select it from the layers utility on the right hand side. I have tried this with a mouse and a Wacom tablet, same result.

    Fixed by running updates, resetting preferences and rebooting. Phew!

  • Break link to Character Style with JS (CS4ME)

    Hi,
    I'm wondering how to break a link to a character style in JS. By break
    link I mean removing the character style but preserving the formatting.
    Given a selected textStyleRange, say, in the UI there are two ways of
    doing this. One is to click "Break link to Style" in the flyout meny of
    the character style palette.
    The other is to right-click and select "Apply character style."
    It's a little unintuitive, because CLICKING on removes overrides,
    but right-clicking and selecting the menu option doesn't.
    So when I saw that, I said to myself aha! Probably:
    myText.appliedCharacterStyle = myCharStyle
    is equivalent to clicking on , while
    myText.applyCharacterStyle(myCharStyle)
    is equivalent to right-clicking on and choosing "Apply character
    style."
    But it isn't.
    They both apply None and remove all formatting.
    So, anyone know how to break a link to character style without removing
    formatting in JS?
    Thanks,
    Ariel

    Thanks Peter. That's interesting. After Shabbos I'll have to try figure
    out how to apply a character style without removing overrides as well.
    It may be a two-step procedure.
    Thanks,
    Ariel

  • [JS] How to break link to paragraph style from script?

    I don't found the command break link to paragraph style from script.
    I want "unapply" the style from the text, but leave the formatting intact.
    Can help me?

    In the interface it's a separate command ("Break link to style"), but it seems in a script you have to use
    Paragraph.applyParagraphStyle (using:ParagraphStyle[, clearingOverrides:bool=true])
    You cannot use "null" or something similar for "ParagraphStyle", so I guess the idea is to use paragraph style #0 in your document (which is always "[No Paragraph Style]"). Be sure to set "clearing Overrides" to false, as it defaults to true.
    The following single line works on your current paragraph:
    app.activeDocument.selection[0].paragraphs[0].applyParagraphStyle (app.activeDocument.paragraphStyles[0], false);

  • Niceties of apply the [None] character style and its relation to Break link to Character Style (CS4 upwards)

    Hi,
    Am I the last to realise that, with text selected, clicking on is
    different from right-clicking on and selecting "Apply " in
    the character palette?
    Let me explain: Say you have some text selected. The text has a
    character style applied called "Superscript", whose only attribute is to
    apply superscript.
    Now, with that text selected, if you click on the result is that
    is applied and all formatting is lost.
    But, if you right-click on and choose "Apply " from the
    context menu, is applied but formatting is NOT list. Effectively
    this is the equivalent of choosing "Break link to style" in the flyout
    menu of the character palette.
    Curious to know if you've come across that that distinction before?
    Thanks,
    Ariel

    Sorry Peter. On behalf of the stupid Jive forums, I do apologize. Everywhere in my post where I wrote [None], it was jived up a little and changed to a link. (I've only got Internet access during breaks -- a self-imposed firewall that allows me to actually get some work done.)
    The post shoudl have read:
    Hi,
    Am I the last to realise that, with text selected, clicking on [None] is different from right-clicking on [None] and selecting "Apply [None]" in the character palette?
    Let me explain: Say you have some text selected. The text has a character style applied called "Superscript", whose only attribute is to apply superscript.
    Now, with that text selected, if you click on [None] the result is that [None] is applied and all formatting is lost.
    But, if you right-click on [None] and choose "Apply [None]" from the context menu, [None] is applied but formatting is NOT list. Effectively this is the equivalent of choosing "Break link to style" in the flyout menu of the character palette.
    Curious to know if you've come across that that distinction before?
    Thanks,
    Ariel

  • Break Link with Style

    Hello all,
    I need to break a link to an object style via script. I found this discussion:
    http://www.adobeforums.com/webx?128@@.59b4d4d7
    jxswm suggests the line founds[i].applyObjectStyle(dstStyle, false, false); but this is the same as clicking on "None" and not the same as calling "Break link to style". I.e. the formatiing is lost and replaced by [None].
    Has anyone found out how to break the link without the object changing its formatting?
    Thank you very much.

    Ah, not quite. "myObj.appliedObjectStyle = myTempStyle" removes overrides. But myObj.applyObjectStyle(mytempStyle, false false) does not, so this is easily fixed.
    For any lurkers or archive-diggers (like myself ;) ) my entire routine:
      var myMenuAction = app.menuActions.item("$ID/Copy");
      app.clearOverridesWhenApplyingStyle = false;
      if (app.selection.length > 0) {
        var noStyle = app.documents[0].objectStyles[0];
        for (var n=0; n < app.selection.length; n++) {
          var myObj= app.selection[n];
          var myStyle = myObj.appliedObjectStyle;
          if (myStyle != noStyle) {
            var myTempStyle = myStyle.duplicate();
            myObj.applyObjectStyle(myTempStyle, false, false);
            myTempStyle.remove();
      } else {
        beep();
        beep();
      app.copy();

  • Break link to Cell and Table Style and keep the style setting

    For cell Selection is work (but can't keep the style setting after break the link), but I also want to break the table style, but error
    For both Break link to cell/table style, I want to keep the style setting after break the link
    BreakLinkToTableStyleSelection();
    BreakLinkToCellStyleSelection();
    function BreakLinkToTableStyleSelection () {
    var
         mNone = app.activeDocument.tableStyles.item(0),
         mSel = app.selection[0];
    if(mSel.constructor.name === "Cell" || mSel.constructor.name === "Table") {
        mSel.tables.everyItem().appliedTableStyle = mNone;
        return;
    if(mSel.hasOwnProperty("baselineShift")){
        mSel.tables.everyItem().appliedTableStyle = mNone;
        return;
    function BreakLinkToCellStyleSelection () {
    var
         mNone = app.activeDocument.cellStyles.item(0),
         mSel = app.selection[0];
    if(mSel.constructor.name === "Cell" || mSel.constructor.name === "Table") {
        mSel.cells.everyItem().appliedCellStyle = mNone;
        return;
    if(mSel.hasOwnProperty("baselineShift")){
        mSel.tables.everyItem().cells.everyItem().appliedCellStyle = mNone;
        return;

    For cell Selection is work (but can't keep the style setting after break the link), but I also want to break the table style, but error
    For both Break link to cell/table style, I want to keep the style setting after break the link
    BreakLinkToTableStyleSelection();
    BreakLinkToCellStyleSelection();
    function BreakLinkToTableStyleSelection () {
    var
         mNone = app.activeDocument.tableStyles.item(0),
         mSel = app.selection[0];
    if(mSel.constructor.name === "Cell" || mSel.constructor.name === "Table") {
        mSel.tables.everyItem().appliedTableStyle = mNone;
        return;
    if(mSel.hasOwnProperty("baselineShift")){
        mSel.tables.everyItem().appliedTableStyle = mNone;
        return;
    function BreakLinkToCellStyleSelection () {
    var
         mNone = app.activeDocument.cellStyles.item(0),
         mSel = app.selection[0];
    if(mSel.constructor.name === "Cell" || mSel.constructor.name === "Table") {
        mSel.cells.everyItem().appliedCellStyle = mNone;
        return;
    if(mSel.hasOwnProperty("baselineShift")){
        mSel.tables.everyItem().cells.everyItem().appliedCellStyle = mNone;
        return;

  • Javascript: select all text, break link to style

    Hi
    I'd like to select all text in a Document (in different independent textboxes) and then break the link to it's style (in the program in the Flyout-menu of the paragraph styles)
    Is this function scriptable (javascript)?
    How do I select all the text?
    InDesign CS6, OS10.7.4
    Thanks

    In fact, I use the adobe findchangebylist to modified, I want to do a clear setting script, not only break link to style, but when i run the script that will get error, can u help me to fix it, my script is shown as below:
    main();
    function main(){
    var myObject;
    //var myCheckSelection = false;
    //Make certain that user interaction (display of dialogs, etc.) is turned on.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    if(app.documents.length > 0){
      if(app.selection.length > 0){
       switch(app.selection[0].constructor.name){
        case "InsertionPoint":
        case "Character":
        case "Word":
        case "TextStyleRange":
        case "Line":
        case "Paragraph":
        case "TextColumn":
        case "TextFrame":
        case "Text":
        case "Cell":
        case "Column":
        case "Row":
        case "Table":
         myDisplayDialog();
         break;
        default:
         //Something was selected, but it wasn't a text object, so search the document.
         //myFindChangeByList(app.documents.item(0));
                        //alert("Nothing Selected, Please Select Text Frame or Text.");
      else{
       //Nothing was selected, so simply search the document.
                //myFindChangeByList(app.documents.item(0));
                alert("Nothing Selected, Please Select Text Frame or Text.");
    else{
      alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
    var myObject;
    var myDialog = app.dialogs.add({name:"Joan New Clear Setting_v1.0"});
    with(myDialog.dialogColumns.add()){
       with(dialogRows.add()){
       with(dialogColumns.add()){
    staticTexts.add({staticLabel:"Search Range:"});
         var mySearchButtons = radiobuttonGroups.add();
         with(mySearchButtons){
         radiobuttonControls.add({staticLabel:"Current Document", checkedState:true});
                       if(app.selection[0].contents != ""){
        radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
       with(dialogColumns.add()){
        with(borderPanels.add()){
         staticTexts.add({staticLabel:"Clear Setting:"});
         var myDateButtons = radiobuttonGroups.add();
         with(myDateButtons){
         radiobuttonControls.add({staticLabel:"English", checkedState:true});
         radiobuttonControls.add({staticLabel:"Chinese"});
    var myResult = myDialog.show();
    if(myResult == true){
      switch(mySearchButtons.selectedButton){
       case 0:
                     BreakLinktoStyleDocument();
                     TurnOffHyphenationDocument();
                     myObject = app.documents.item(0);
                     myCheckSelection = false;
        break;
                  case 1:
                     BreakLinktoStyleSelection();
                     TurnOffHyphenationSelection();
                     myObject = app.selection[0];
                     myCheckSelection = true;
        break;
      switch(myDateButtons.selectedButton){
      case 0:
      myFindChangeByList1(myObject, myCheckSelection);
      break;
      case 1:
      myFindChangeByList2(myObject, myCheckSelection);
      break;
      myDialog.destroy();
      //myFindChangeByList1(myObject);
    else{
      myDialog.destroy();
    function TurnOffHyphenationDocument() {
    app.activeDocument.stories.everyItem().texts.everyItem().hyphenation=false;
    myTables = app.activeDocument.stories.everyItem().tables.everyItem();
    myTables.cells.everyItem().paragraphs.everyItem().hyphenation=false;
    function TurnOffHyphenationSelection() {
    app.selection[0].texts[0].hyphenation=false;
    app.selection[0].cells.everyItem().texts[0].hyphenation=false;
    function BreakLinktoStyleDocument() {
    app.activeDocument.stories.everyItem().texts.everyItem().applyParagraphStyle(app.activeDoc ument.paragraphStyles.item(0), false);
    app.activeDocument.stories.everyItem().texts.everyItem().applyCharacterStyle(app.activeDoc ument.characterStyles.item(0), false);
    myTables = app.activeDocument.stories.everyItem().tables.everyItem();
    myTables.cells.everyItem().paragraphs.everyItem().applyParagraphStyle( app.activeDocument.paragraphStyles.item(0), false);
    myTables.cells.everyItem().paragraphs.everyItem().applyCharacterStyle( app.activeDocument.characterStyles.item(0), false);
    function BreakLinktoStyleSelection() {
    app.selection[0].texts.everyItem().applyParagraphStyle(app.activeDocument.paragraphStyles. item(0), false);
    app.selection[0].texts.everyItem().applyCharacterStyle(app.activeDocument.characterStyles. item(0), false);
    app.selection[0].cells.everyItem().texts[0].applyParagraphStyle(app.activeDocument.paragra phStyles.item(0), false);
    app.selection[0].cells.everyItem().texts[0].applyCharacterStyle(app.activeDocument.charact erStyles.item(0), false);
    function myFindChangeByList1(myObject, myCheckSelection){
    var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
    var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit;
    var myStartCharacter, myEndCharacter;
    var myFindChangeFile = myFindFile("/ScriptSupport/te.txt")
    if(myFindChangeFile != null){
            // Because the selection will change as we add/remove characters,
            // we'll need to reset the selection after each pass if we are
            // checking the selection. We'll get the index of the first character
            // in the selection (relative to the start of its parent story) and
            // the index of the last character in the selection (relative to the
            // *end* of the story, and we'll use them later in the script to
            // keep the ends of the selection in place.
      if(myCheckSelection == true){
       var myStart = myObject.characters.item(0).index;
       var myEnd = myObject.characters.item(-1).index;
       var myStory = myObject.parentStory;
       var myStoryEnd = myStory.characters.item(-1).index;
       myEnd = (myStoryEnd - myEnd)+1;
      myFindChangeFile = File(myFindChangeFile);
      var myResult = myFindChangeFile.open("r", undefined, undefined);
      if(myResult == true){
       //Loop through the find/change operations.
       do{
        myLine = myFindChangeFile.readln();
        //Ignore comment lines and blank lines.
        if((myLine.substring(0,4)!="text")||(myLine.substring(0,4)!="grep")||(myLine.substring(0, 5)!="glyph")){
         myFindChangeArray = myLine.split("\t");
         //The first field in the line is the findType string.
         myFindType = myFindChangeArray[0];
         //The second field in the line is the FindPreferences string.
         myFindPreferences = myFindChangeArray[1];
         //The second field in the line is the ChangePreferences string.
         myChangePreferences = myFindChangeArray[2];
         //The fourth field is the range--used only by text find/change.
         myFindChangeOptions = myFindChangeArray[3];
         switch(myFindType){
          case "text":
           myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
           break;
          case "grep":
           myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
           break;
          case "glyph":
           myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
           break;
         if(myCheckSelection == true){
          myStartCharacter = myStory.characters.item(myStart);
          myEndCharacter = myStory.characters.item(-myEnd);
          myObject = myStory.texts.itemByRange(myStartCharacter, myEndCharacter);
          app.select (myObject);
       } while(myFindChangeFile.eof == false);
       myFindChangeFile.close();
    alert("Done");
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
    //Reset the find/change preferences before each search.
    app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences = NothingEnum.nothing;
    app.findChangeTextOptions = NothingEnum.nothing;
    var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
    myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
    myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
    app.doScript(myString, ScriptLanguage.javascript);
      myFoundItems = myObject.changeText();
    //Reset the find/change preferences after each search.
    app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences = NothingEnum.nothing;
    app.findChangeTextOptions = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
    //Reset the find/change grep preferences before each search.
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findChangeGrepOptions = NothingEnum.nothing;
    var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
    myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
    myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
    app.doScript(myString, ScriptLanguage.javascript);
    var myFoundItems = myObject.changeGrep();
    //Reset the find/change grep preferences after each search.
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findChangeGrepOptions = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
    //Reset the find/change glyph preferences before each search.
    app.changeGlyphPreferences = NothingEnum.nothing;
    app.findGlyphPreferences = NothingEnum.nothing;
    app.findChangeGlyphOptions = NothingEnum.nothing;
    var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
    myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
    myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
    app.doScript(myString, ScriptLanguage.javascript);
    var myFoundItems = myObject.changeGlyph();
    //Reset the find/change glyph preferences after each search.
    app.changeGlyphPreferences = NothingEnum.nothing;
    app.findGlyphPreferences = NothingEnum.nothing;
    app.findChangeGlyphOptions = NothingEnum.nothing;
    function myFindFile(myFilePath){
    var myScriptFile = myGetScriptPath();
    var myScriptFile = File(myScriptFile);
    var myScriptFolder = myScriptFile.path;
    myFilePath = myScriptFolder + myFilePath;
    if(File(myFilePath).exists == false){
      //Display a dialog.
      myFilePath = File.openDialog("Choose the file containing your find/change list");
    return myFilePath;
    function myGetScriptPath(){
    try{
      myFile = app.activeScript;
    catch(myError){
      myFile = myError.fileName;
    return myFile;
    and here is my text file, te.txt
    //001
    grep {findWhat:"."} {appliedLanguage: app.languagesWithVendors.item("English: USA"), kerningMethod: "無"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //002
    grep {findWhat:"."} {kinsokuSet: "繁體中文避頭尾(s)"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //003
    grep {findWhat:"."} {mojikumi: "nothing"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //004
    grep {findWhat:"."} {ligatures:false} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //005
    grep {findWhat:"."} {gridAlignment: 1852796517} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //006
    grep {findWhat:"."} {leadingModel: 1248619858} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
    //007
    grep {findWhat:"."} {characterAlignment: 1247896172} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}

  • Count layers within precomposed layer

    Hello dear scripters.
    I'm trying to count the layers within a precomposed layer.
    has somebody a solution for my problem?
    Thnx a lot.
    :F
    This is my code:
    var curComp = app.project.activeItem; // this is my acive comp
    var theSelection = curComp.selectedLayers; // i selected some comps
    var compLayer = theSelection[0]; // compLayer is also a comp
    // and here is my problem
    // this doesn't return the number of layers within my compLayer
    var theNumber = parseInt(compLayer.numLayers);
    alert(theNumber); // returns undefined but i need an integer

    Great. That works.
    Thnx again for your help Dan.
    :F
    Here is the working code.
    It takes a selection of comps in the active comp.
    Enables timeremapping.
    Adds a null as controller with some sliders.
    And adds an expression to the timeremapping
    this just works with CompItems.
    It is usefull if the layers in the comps are sequenced with one frame length
    // written by fabiantheblind
    // http://www.the-moron.net
    // with a hint by Dan E.
    // http://forums.adobe.com/message/3310628#3310628
    applyExpression ();
    function applyExpression(){
        // begin an Undo group
        app.beginUndoGroup("apply Expressions");
        // check if a comp is active
            var curComp = app.project.activeItem;
        if (!curComp || !(curComp instanceof CompItem))
            alert("Please select a Composition.");
            return;
        // get the selection
        var theSelection = curComp.selectedLayers;
        // you could use this for a null within the workarea
        //var theController = curComp.addNull(curComp.workAreaDuration);
        // add a null object to the comp for the slider controls
        var theController = curComp.layers.addNull();
        // make a unique name for the null. dont use the date its just a reminder
        theController.name =  prompt("Enter an unique name for the controller Null Object", "control_"+ Date().toString());
        // loop thru selection
        for (var layerId = 0; layerId < theSelection.length; layerId++)
            var layer = theSelection[layerId];
            // get the number of layers within the layer
            // -1 because
            // layers start at index 1 frames start at 0 Frames
            // Thnx Dan for the word ".source."
            var theNumber = parseInt(layer.source.numLayers -1);
            // add a slider control to the null obj.
            var theSliderEffect = theController("ADBE Effect Parade").addProperty("ADBE Slider Control");
            // change the name of the slider to something usefull
            theSliderEffect.name = layer.name + "_cntrl_" + layerId;
            // this is for the timeremapping to make em all hold keyframes
            var holdInt = KeyframeInterpolationType.HOLD;
            // get the timeremapping property and enable it
            var property = layer.property("ADBE Time Remapping");
                  layer.timeRemapEnabled = true;
                // set all keyframes to hold
          for (var i = 1; i <= property.numKeys; i++){
            property.setInterpolationTypeAtKey(i, holdInt, holdInt);
            // remove the last keyframe. dont need it
            property.removeKey(property.numKeys);
            // check if the property can take expressions
            // dont need it. but i need more checking
            if (!property.canSetExpression) { continue }
            // apply the expression with
            //the name of the slider
            // the name of the control null
            // and the number of layers within the comps
            property.expression = exprString(theSliderEffect.name, theController.name, theNumber);
        app.endUndoGroup();
    // this function builds the expression string
    function exprString(inEffName, inControllerName,inNum){
        // the name of the effect
        var theEffName =  inEffName;
        // the name of the control null obj
        var theCntrlName = inControllerName;
        // the number of layers within the timeremapped comps
        var theNumber = inNum;
        // the expr will be something like this: !!watch out german expression!! (replace "Schieberegler" with "Slider Control"):
        // this expression remaps the frame number within the comp to values from the slider
        // val = Math.floor(thisComp.layer("control").effect("MovementControl")("Schieberegler"))*thisComp .frameDuration;
        //if (Math.floor(thisComp.layer("control").effect("MovementControl")("Schieberegler")) < 0){val =0;
        //}if (Math.floor(thisComp.layer("control").effect("MovementControl")("Schieberegler")) > 3){val =3* thisComp.frameDuration;
        // build the string with the variables from the selection
        var theString = "val = Math.floor(thisComp.layer(\"" + theCntrlName + "\").effect(\"" + theEffName +"\")(\"Schieberegler\"))*thisComp.frameDuration;\n"+
        " if (Math.floor(thisComp.layer(\"" + theCntrlName + "\").effect(\""+ theEffName +"\")(\"Schieberegler\")) < 0){val =0;\n"+
        " }if (Math.floor(thisComp.layer(\"" + theCntrlName + "\").effect(\""+ theEffName +"\")(\"Schieberegler\")) > "+theNumber+"){val ="+theNumber+"* thisComp.frameDuration;\n }" ;
        // and return the string
        return theString;

Maybe you are looking for