Please improve my script

Hello

I wrote the script to find the size of the text below 6 pts, text leading less than 3 pts, hyphenation and ligature on.

It is works well but taking too long to process (say only 64 pages totally in my paper), it's any changes made to improve his speed?

mypoinsize();
myleading();
mylig();
myhypandlig()

function mypoinsize(){
var myFrame=app.activeDocument.textFrames.length
var flag2=0;
for(i=0;i<myFrame;i++){
for(j=0;j<app.activeDocument.textFrames.item(i).paragraphs.length;j++){
var myCV=app.activeDocument.textFrames.item(i).paragraphs.item(j).pointSize;
var myCV1=app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().pointSize;
if(myCV<6 || myCV1<6)
{

flag2=1
}
}
}
if(flag2==1)
{
alert("ERROR: Document contain less than 6 point size text"+"\r\r");


}
else
{


alert("Document doesn't contain less than 6 point size text"+"\r\r");
}
}              


//leading
function myleading(){


var myFrame=app.activeDocument.textFrames.length
var flag3=0;
for(i=0;i<myFrame;i++){
for(j=0;j<app.activeDocument.textFrames.item(i).paragraphs.length;j++){
var myCV=app.activeDocument.textFrames.item(i).paragraphs.item(j).leading;
var myCV1=app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().leading;


if(myCV<3 || myCV1<3)
{


flag3=1
}
}
}


if(flag3==1)
{


alert("ERROR: Document contain less than 3 point size leading"+"\r\r");


}
else
{


alert("Document doesn't contain less than 3 point size leading"+"\r\r");
}
}
//hyp and lig
function mylig(){
var myFrame=app.activeDocument.textFrames.length
var flag4=0;
for(i=0;i<myFrame;i++){
for(j=0;j<app.activeDocument.textFrames.item(i).paragraphs.length;j++){
var myResult=app.activeDocument.textFrames.item(i).paragraphs.item(j).hyphenation;
var myResult1=app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().hyphenation;


if(myResult==true || myResult1==true)
{


flag4=1
}
}
}


if(flag4==1)
{


alert("ERROR: Document contain Hyphenation"+"\r\r");


}
else
{


alert("Document doesn't contain Hyphenation"+"\r\r");
}


}       


//hyp and lig
function myhypandlig(){
var myFrame=app.activeDocument.textFrames.length
var flag4=0;
for(i=0;i<myFrame;i++){
for(j=0;j<app.activeDocument.textFrames.item(i).paragraphs.length;j++){
myResult=app.activeDocument.textFrames.item(i).paragraphs.item(j).ligatures;
var myResult1=app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().ligatures;


if(myResult==true || myResult1==true)
{


flag4=1
}
}
}


if(flag4==1)
{


alert("ERROR: Document contain Ligature "+"\r\r");


}
else
{


alert("Document doesn't contain Ligature"+"\r\r");
}
}    


Thank you in advance,

Kitty

Sorry, I'm tempted and do not think things through. You cannot use findGrep() to search for text that is smaller than 6 pt.

You can try something like:

doc.stories.everyItem (). textStyleRanges.everyItem (.pointSize)

Who turn over a fairly wide range with all text sizes in your stories (tables, notes not included).

Then you can iterate over it, or you can filter, or just sort and test for the first item.

Tags: InDesign

Similar Questions

  • Please share the Script to retrieve the name of host, HBA, HBAstatus, WWN, pathpolicy and dualpathinfo

    Please share the Script to retrieve the name of host, HBA, HBAstatus, WWN, pathpolicy and dualpathinfo

    Take a look on Re: information on the host hardware with information about the HBA drivers and nic

  • Please correct my script setting of hyphenation

    Hello

    1. I want to put the break = false for all title levels, level CAP details saved in .txt file format. For example 'title detail.txt' has the heading level paragraph style names: H1, H2, BT, CT, CN.
    2. Otherwise if the hyphenation = true in the styles of normal paragraph (such as TX, EXT) I have to change the setting of the hyphenation. This one I also finished as the script below

    app.activeDocument.paragraphStyles.everyItem () = {} .properties

    hyphenateWordsLongerThan:6,

    hyphenateAfterFirst:3,

    hyphenateBeforeLast:3,

    hyphenateLadderLimit:2,

    hyphenationZone: "1 p",

    hyphenateCapitalizedWords:true,

    hyphenateLastWord:false,

    hyphenateAcrossColumns:false,

    }

    If (myPara [i] .hyphenation = false)

    I want to implement the 1 point in detail in my script, so please correct my script.

    Thank you

    Hi Cognet,

    Great thanks for your help in timing, thanks again.

    by

    hasvi

  • Please improve the interface of the app podcast

    The interface of podcast app needs improvement to make it more pleasant to use for IO 9.3.2 on my iPhone 5.

    Scrub bar is useless if you have a case on the device and the progress bar of the song/podcast is to the beginning or the end.  My finger can not raise the bar to move it forward.  Why don't I have to have my finger placed above the progress bar? What about allowing scouring forwards and backwards over anywhere on the line of scrub?  Cannot drag on the line to do something?

    What is, adding a 30 second skip? Keep the second 15 jump but add a 30. Podcasts sometimes long need more time to jump.   Add a way to jump so striking to swipe to skim long podcast.  Cleaning is not exact, but 30 seconds on the scrub line would be easier navigate through the content.

    Where the 'next' and 'Back' is passed? This isn't a big deal, but what about adding left/right/up sliding on the album art for next/back?

    Maybe reduce the album art for more controls?  Controls can be placed on the album art?

    Incorporating more features slide in the app to listen to several content would make for a nicer and more powerful experience.

    It is a forum for user help. You do not discuss Apple here, but you can through this link http://www.apple.com/feedback/

  • Help please change the script number

    Hello!

    There is one such script or plugin, hand Controller.jsx and there is a single track camera parameter limit somehow the number that allows you to control up to 1370, for example, I need to infinity, or at least to 20,000, to try to change the number in the main Controller.jsx file but nothing changed. wrote one person here, he said the difficulty of "PresetEffects.xml" in the folder "C:-Program Files-Adobe------Adobe after effects CC 2015------Support Files. I changed the track camera up to the desired value, but as soon as I change more than 1370 all is lost. Plug-and-project joint. project of https://Cloud.mail.ru/public/3AwZ/fCu2WcPSh and https://cloud.mail.ru/public/H6C8/smxDKdXPM

    Help me please.

    Here it goes

  • Please correct this script to call xml element

    Hi all

    How to fix this script for 'lev1sec1' calls 'H1' in the paragraph style, and "lev2sec1" must call "H2".

    Issue 1:

    This is the code: this works very well for xml file below.

    var myDocument = app.documents.item(0);
        var myPage = myDocument.pages.item(0);
      //Create a tag to style mapping.
      myDocument.xmlImportMaps.add(myDocument.xmlTags.item("heading_1"), myDocument.paragraphStyles.item("H1"));
      myDocument.xmlImportMaps.add(myDocument.xmlTags.item("heading_2"), myDocument.paragraphStyles.item("H2"));
      myDocument.xmlImportMaps.add(myDocument.xmlTags.item("para_1"), myDocument.paragraphStyles.item("TXF"));
      myDocument.xmlImportMaps.add(myDocument.xmlTags.item("body_text"), myDocument.paragraphStyles.item("TX"));
      //Map the XML tags to the defined styles.
      myDocument.mapXMLTagsToStyles();
    

    3.png

    2nd question:

    Another xml file has different coding as below, but its presentation as below, lev1 (H1) and lev2 (H2) all have two same < title > tag, how do I set '< id article = "ch01lev1sec1" > < title >' for H1, < id article = "ch01lev2sec1" > < title > H2. For your reference, I enclose below the snapshot.

    4.png

    2.png1.png

    Please help with this problem.

    by

    hasvi

    Hasvi,

    Try this.

    #include "glue code.jsx";
    var doc = app.activeDocument,
        ruleSet = new Array (new AddReturns);
    __processRuleSet(doc.xmlElements.item(0), ruleSet);
    function AddReturns()
    {
        this.name = "MapStyles";
        this.xpath = "//section[@id]";
        this.apply = function(element)
        {
            if(element.xmlAttributes.itemByName("id").value === 'ch01lev1sec1')
            {
                    element.applyParagraphStyle('H1')
                }
            if(element.xmlAttributes.itemByName("id").value === 'ch01lev2sec1')
            {
                    element.applyParagraphStyle('H2')
                }
            }
        }
    

    Kind regards

    Cognet

  • Please check my script

    Hi people

    Please help me on this

    the shell script test.ksh has a lot of code
    imp USERID=scott@abc/tiger FILE=xyz.dmp TABLES=emp_DAT,dept_DAT
    whil am running the script as
    ./test.ksh
    
    Import: Release 11.2.0.1.0 - Production on Tue Jan 22 09:12:44 2013
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    Password:
    The password is requested even if I provided the password :(

    Please help on this

    ConnectString is /@.
    Use scott/tiger@abc rather than scott@abc/tiger.

  • Please provide the script story Splitter by Adi Ravid?

    Hello

    I'm working on a book complex and need to separate stories threaded in many places. I know that I can do it manually via the editor of history but have really set my eyes on the script to split history created by Adi Ravid. I found its place @ the Adobe Exchange website (http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail & loc = en_us & extid = 1302 # 518), but get an error "sorry, we have encountered an error while processing your request." - also when pressing on ' author Email: Adi Ravid.

    So, someone who has the script, please report it here could?

    Thank you very much in advance

    /*

    ------------------------------------------------------------------------------------------ ------------------------

    StorySplitter

    ------------------------------------------------------------------------------------------ ------------------------

    A JavaScript InDesign CS/CS2/CS3 by FourAces

    On the final 2006 touch

    Version 3.0.0

    Divides history chosen to separate blocks of text, while maintaining their content.

    ------------------------------------------------------------------------------------------ ------------------------

    */

    var myScriptVer = "3.0"

    If (app.documents.length! = 0) {}

    mySelection var = app.activeDocument.selection;

    If (mySelection.length! = 0) {}

    myObjectType = mySelection [0].constructor.name;

    If (myObjectType == "TextFrame") {}

    The dialog box Interface

    myDialog = app.dialogs.add var ({name: 'History Splitter v' + myScriptVer});

    {with (MyDialog)}

    {with (dialogColumns.Add ())}

    with (dialogRows.add ()) {}

    {with (borderPanels.Add ())}

    var mySplitOptions = radiobuttonGroups.add ();

    {with (mySplitOptions)}

    radiobuttonControls.add ({staticLabel: "Split all frames", checkedState:true});})

    radiobuttonControls.add ({staticLabel: "Scinder front Selected Frame"});

    radiobuttonControls.add ({staticLabel: "Scinder after Selected Frame"});

    }

    }

    }

    with (dialogRows.add ()) {}

    staticTexts.add ({staticLabel: "© The Final Touch"});

    }

    }

    }

    Ditto var = myDialog.show({name:"SplitOptions"});)

    if(myResult == true) {}

    monarticle var = mySelection [0] .parentStory;

    If (App.version.Split(".") [0] >= 5){

    var myTextFrames = myStory.textContainers;

    }

    else {}

    var myTextFrames = myStory.textFrames;

    }

    var myStoryFramesCount = myTextFrames.length;

    If (myStoryFramesCount > 1) {}

    for (f = 0; f< mystoryframescount;="">

    {If (mySelection [0] == {[f] myStory.textFrames)}

    var myTextFrame = f;

    }

    }

    {Switch (mySplitOptions.selectedButton)}

    case 0:

    mySplitAll();

    break;

    case 1:

    mySplitBefore();

    break;

    case 2:

    mySplitAfter();

    break;

    }

    }

    else {}

    Alert ("are you kidding Me? \nThe history you selected has only a SINGLE block of text. ») ;

    }

    }

    }

    else {}

    Alert ("Selection\nYou evil chosen the wrong type of object. Please select a block of text. ») ;

    }

    }

    else {}

    Alert ("No selection Made. \nPlease specify a history split.");

    }

    }

    else {}

    Alert ("No. Active Document Found. ("\nPlease open an InDesign document and select a story to split.");

    }

    //----------------------------------------------------------------------------

    function mySplitAll() {}

    for (i = 0; i< mystoryframescount;="">

    myTextFrames [i] .duplicate ();

    }

    for (i = 0; i< mystoryframescount;="">

    If (App.version.Split(".") [0] >= 5){

    myTextFrames [i] .remove ();

    }

    else {}

    myTextFrames [0] .remove ();

    }

    }

    }

    function mySplitBefore() {}

    If (.previousTextFrame mySelection [0] == null) {}

    Alert ("unable to break Thread. \nThe selected text block is the FIRST block of text in the thread.");

    }

    else {}

    var myBfBreakFrame = .previousTextFrame mySelection [0];

    var myAfBreakFrame = mySelection [0];

    var myBreakStory = myBfBreakFrame.parentStory;

    mySelection [0] .previousTextFrame = null;

    if(myBfBreakFrame.Overflows == true) {}

    var myOversetText = myBreakStory.texts.itemByRange (myBfBreakFrame.insertionPoints [-1], anointed myBreakStory.insertionP [-1]);

    myOversetText.select ();

    App.Cut ();

    App.Select(myAfBreakFrame.insertionPoints[0]);

    App.Paste ();

    }

    }

    }

    function mySplitAfter() {}

    If (.nextTextFrame mySelection [0] == null) {}

    Alert ("unable to break Thread. \nThe selected text block is the LAST block of text in the thread.");

    }

    else {}

    var myBfBreakFrame = mySelection [0];

    var myAfBreakFrame = .nextTextFrame mySelection [0];

    var myBreakStory = myBfBreakFrame.parentStory;

    mySelection [0] .nextTextFrame = null;

    if(myBfBreakFrame.Overflows == true) {}

    var myOversetText = myBreakStory.texts.itemByRange (myBfBreakFrame.insertionPoints [-1], anointed myBreakStory.insertionP [-1]);

    myOversetText.select ();

    App.Cut ();

    App.Select(myAfBreakFrame.insertionPoints[0]);

    App.Paste ();

    }

    }

    }

  • Please see this script of api 3d javacript refence

    //-------------------------------------------------------------
    -Do not change the tags XML-
    //-------------------------------------------------------------

    < AcroForm >
    < ACRO_source > Animation: Annot1:MouseUp:Action1 < / ACRO_source >
    < ACRO_script >
    / * belongs to: AcroForm:Animation:Annot1:MouseUp:Action1 * /.
    ATMO = getAnnots3D (0) [0] .context3D;

    atmo.toggleSpinIt ();


    < / ACRO_script >
    < / AcroForm >

    < AcroForm >
    < ACRO_source > collapse: Annot1:MouseUp:Action1 < / ACRO_source >
    < ACRO_script >
    / * belongs to: AcroForm:Collapse:Annot1:MouseUp:Action1 * /.
    ATMO = getAnnots3D (0) [0] .context3D;

    atmo.collapseIt ();

    < / ACRO_script >
    < / AcroForm >

    < AcroForm >
    < ACRO_source > explode: Annot1:MouseUp:Action1 < / ACRO_source >
    < ACRO_script >
    / * belongs to: AcroForm: explode: Annot1:MouseUp:Action1 * /.
    ATMO = getAnnots3D (0) [0] .context3D;

    atmo.explodeIt ();

    < / ACRO_script >
    < / AcroForm >

    < AcroForm >
    < ACRO_source > graph: Annot1:MouseUp:Action1 < / ACRO_source >
    < ACRO_script >
    / * belongs to: AcroForm:Graphic:Annot1:MouseUp:Action1 * /.
    ATMO = getAnnots3D (0) [0] .context3D;

    ATMO. Flow.toggle ();


    < / ACRO_script >
    < / AcroForm >


    I'm new to this 3d refence javascript

    in above code

    atmo.toggleSpinIt ();

    atmo.collapseIt ();

    atmo.explodeIt ();

    ATMO. Flow.toggle ();

    are they above functions are built in functions or custom function. Because when you debug the i impossible stepinto functions above.

    js where these method are stroed. Please let me know

    Please report it in the Acrobat Scripting forum. If you are unable to get help here, there is a forum of Acrobat 3D features.

  • Apple, please improve 'hide' photo

    IOS: 10.0.1

    OS X: 10.11.6

    I have some nice pictures of my staff to breastfeed our baby, that my wife and I consider very woman and would like to keep private.  On the other hand, we have amazing pictures that we would like to see family and friends when they come to the wire.  Normally we cela by opening the "Photos" application and just scroll through all the happy memories in the "All Photos" album (scroll even faster spent boring photos of recipes, places Park us etc.).

    We can do it is by chance that we have pictures that are private that not actually get hidden album "All Photos" even if they are marked as hidden. It is a design failure, please fix it.

    It is a forum for user help. You do not discuss Apple here.

    To submit your comments directly to Apple using this link http://www.apple.com/feedback/

    You, that you might create an album of all the photos you want to show to others.

  • First HP: Please improve the App sequence

    Here, a problem with PHP, but to work with Ti or Casio:

    I have 2 U1 and U2 linked sequences. As with the other calculator, I try this:

    U1 (1) = 1 and U1 (N) = 2 * U1 (N - 1) + (N - 1) U2

    U2 (1) = 7 and U2 (N) = 1/3 * (U1(N-1) + 2 * U2 (N-1))

    Unfortunately, this is going to work (no check U1).

    I am using this trick:

    In the definition of U1 and only in this one, I replace U2(N-1) by:

    1/2 * (3 * U2 (N) - U1(N-1)

    Difficult for a young student not?

    In your opinion, is this a bug in PHP?

    This Version of the firmware: 2015 04 27 GREATLY improve the first HP.

    Everything I need is here.

    Thanks to HP teams. Well done.

  • Please help - rewrite script to affect all the files in the folder, not one (Photoshop, JavaScript)

    Hey guys ,.

    I don't know much about scripts, but I managed to put together a script that takes the *.ps (postscript) file, open it in photoshop with some settings and then save it in two sizes in two different folders in jpeg. But unfortunately, it only affects a single file *.ps (in a specified path). I have hundreds of these *.ps files and just thinking about opening one makes me dizzy is it possible that I could choose folder with all these *.ps files and script would make these changes to all of them?

    I'd appreciate any help .

    Here is my script:

    Open the file with parameters 1050x750px + rgb eps

    var epsOpts = new EPSOpenOptions();

    epsOpts.antiAlias = true;

    epsOpts.mode = OpenDocumentMode.RGB;

    epsOpts.resolution = 72;

    epsOpts.constrainProportions = true;

    epsOpts.width = new UnitValue (1050, "px")

    var f = new File ("C: / monchemin/myfile.ps '");

    App.Open (f, epsOpts);

    Save 1050px

    var doc = app.activeDocument;

    var Path = ' C: / monchemin/resize/1050 /';

    var Name = doc.name.replace (/ \.) [ ^\.] +$/, '');

    var saveFile = file (path + "/" + Name + ".jpg");

    SaveJPEG (saveFile, 12);

    function SaveJPEG (saveFile, jpegQuality) {}

    jpgSaveOptions = new JPEGSaveOptions();

    jpgSaveOptions.embedColorProfile = true;

    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

    jpgSaveOptions.matte = MatteType.NONE;

    jpgSaveOptions.quality = jpegQuality;

    activeDocument.saveAs (saveFile, jpgSaveOptions, true, Extension.LOWERCASE);

    }

    resize to 360px

    app.activeDocument.resizeImage ("360 pixels", "257 pixels", 72, ResampleMethod.BICUBIC);

    Save 360px

    var doc360 = app.activeDocument;

    var Path360 = ' C: / monchemin/resize/360 /';

    var Name360 = doc.name.replace (/ \.) [ ^\.] +$/, '');

    var File = saveFile360 (Path360 + "/" + Name360 + '.jpg');

    SaveJPEG360 (saveFile360, 12);

    function SaveJPEG360 (saveFile360, jpegQuality) {}

    jpgSaveOptions = new JPEGSaveOptions();

    jpgSaveOptions.embedColorProfile = true;

    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

    jpgSaveOptions.matte = MatteType.NONE;

    jpgSaveOptions.quality = jpegQuality;

    activeDocument.saveAs (saveFile360, jpgSaveOptions, true, Extension.LOWERCASE);

    }

    Close the file

    app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);

    Thanks in advance !

    This would be an alert for each file in the formats defined in the selected folder.

    Of course, you can insert the code you need in the clause for.

    Var folder = Folder.selectDialog ("select folder");

    If {(Folder)

    Uses of the var = theFolder.getFiles (/ \.) (jpg) | TIF | EPS | PSD | (ch) / $i);

    for (var m = 0; m< thefiles.length;="" m++)="">

    Alert (theFiles [m])

    };

    };

  • HP could you please consider improve the webshop to the United Kingdom, so that users can configure laptops?

    Hello

    I would really like to buy a new HP Envy 17 3d 2011 model with a hard drive to SSD & HDD combo, 16 GB of Ram and Full HD radiance display in the problem to the United Kingdom's... I can't.

    This is the model I can get on your shop online r. u. :
    http://h40059.www4.HP.com/UK/homelaptops/product.php?id=A2Q36EA&experience=direct It is the only model I can get PC stores in the United Kingdom as well.

    If however I was an American consumer I have a lot of choice - example here:

    http://www.shopping.HP.com/webapp/shopping/computer_can_series.do?StoreName=computer_store&category=...

    Come on HP - Please improve your international sites so that we too customized products.

    Thank you

    Colesdav

    @ Colesdav

    Thanks a lot for your comments. We will pass this information to the appropriate team.

  • Error of trade rules but Essbase script work

    I created a script to calc, which analyzes and works very well in Essbase. However, when I copy and paste same script in business rule, it gives the error.

    If I remove this line IF ("Allocation of facilities"-> @CurrMbr (Period)-> "Department" > 1), it works fine.

    = Calc script =.

    DIFFICULTY ("HSP_InputValue", "Local", FrcstVer, predictions, & FrcstYear, @Relative(Entity,0), "No_Product", "No_Intercompany", "Facilities")
    Fix (@relative(YearTotal,0))

    Account)
    IF ("Allocation of facilities"-> @CurrMbr (Period)-> "Department" > 1)

    @CurrMbr (Period)-> 'Allocation of facilities' =-("Allocation of facilities"-> @CurrMbr (Period)-> "Department");
    )
    Endfix;
    Endfix;

    ==============ERROR============

    An error occurred while parsing the script.
    Please check the script between the column in the row: 27: 153 and column of the row: 27: 153.
    Found
    token ';' - expected tokens:
    , "/*STARTCOMPONENT:...to end".

    It works when you remove the condition, the reason is you do not have an endif

    Fix (@relative(YearTotal,0))

    Account)

    IF ("facility allowance"-> @CurrMbr-> "Department" (Period) > 1)

    @CurrMbr (Period)-> 'Allocation of facilities' =-("facilities Award"-> @CurrMbr (Period)-> "Department");

    )

    Endfix;

    Try to look your code clean, there are a lot of use unwanted @CURRMBR and other stuff that needs to be improved (not not picking on you, or in a way that I am)

    Concerning

    Celvin Kattookaran

  • Is it possible to save the animation preset by script?

    Hello

    I wrote a script called memory, which save any layer of same model of layers for the generation later. https://github.com/Smallpath/memory

    A few days ago, I filled in the preview function and was ready to release it with tag v3.0. However, script can not get or set the value of special plugins like curve, particular and puppets, nor what to do my script Memory.I know these plugins can be saved as animation preset by click in Ae, but who needs the user to click, select the folder, enter a name for the preset and finally click OK, which isn't me.

    I really need to improve my script. So I wonder if there is a way to save the animation preset by script. Perhaps it may be a hidden such as CompItem.saveFrameToPng.Thanks, for any help method

    I work on the same idea and could not find all hidden for creatine presets modes.

    So I came up with this code:

    function newPreset(){
    
        var activeComp = app.project.activeItem;
        if(activeComp == null){ alert("Please, open composition."); return false;   }
        if(activeComp instanceof CompItem){ }else{   alert("Please, open composition."); return false;  } 
    
        var selectedLayers = activeComp.selectedLayers;
        if(selectedLayers.length == 0){   alert("Please, select any layer."); return false;    } 
    
        selectedLayers[0].effect(1).selected = true;
        app.executeCommand(23); // Select All
        try{ selectedLayers[0].layerStyle.selected = true;  }catch(err){}
    
        app.executeCommand(3075);   // Save Animation Preset   
    
    };
    

    Hope that will help you somehow.

Maybe you are looking for

  • It is current on the analog module USB NI 9263 output voltage limit (+/-10 v)?

    It is current on the analog module USB NI 9263 output voltage limit (+/-10 v)? I try to run a current controlled resistance, but cannot get the required current. The servovalved has a parallel internal resistance of 80 ohms and requires 20 my full op

  • Problem check items in Microsoft Word 2007

    I'm having a problem with my Microsoft Word 2007 program. When I try to record something, it goes to my name and my documents. I have no information here. All my information is in all my Documents. How can I change this program if it will save in My

  • Bluetooth not pair with hands-free on Xperia m4 aqua

    Hi, I just bought the above phone. I tried to implement everything so he can associate with my hands-free kit. I have not had this problem before, EVER! Any ideas as to what I can try? I really want to buy another hands-free kit, in case the same thi

  • USB 3.0 does not, Windows cannot find drivers

    Hello I recently got a Buffalo Drive Station axis speed HD-LXU3. I plugged in a USB 3.0 port as suggested, and Windows did not. So I tried some things and ended up plug it into a USB 2.0 port, after which he started to work very well. I also have a w

  • How to get around the installation remotely on CE8.2 Wizard

    I play a VCS CUCM migration or as part of the process, I factory reset of all endpoints and upgrade points to CE8.2.1. My problem is that even when I have carried out all the steps and have the taped CUCM end point, the first time Installation Wizard