I need a script that would provide leading to different text blocks.

Hello

I need a script that would change with each attack of text frame. Is it possible to make a?

This this example script that works on a selection of blocks of text:

#target illustrator

function test() {}

var doc = app.activeDocument;

var s = doc.selection;

If (s == null & s.length == 0) {}

return;

}

for (var i = 0; i)< s.length; ="">

If (.) S [i] TypeName! = "TextFrame") {}

continue;

}

s [i].textRange.characterAttributes.autoLeading = false;

s [i].textRange.characterAttributes.leading = 22;

};

};

test();

Tags: Illustrator

Similar Questions

  • Need a script that will provide details of concurrent applications that took place beyond the avg time of execution.

    Hi guru - it will be really useful, if so can provide a script that will get details of concurrent applications that went beyond the avg time of execution.

    Thank you

    Are you after something like this? Last column shows the average too.

    select FCP.user_concurrent_program_name
          ,FCR.argument_text
          ,FCR.completion_text
          ,to_char(FCR.actual_start_date,'DD-MON-YYYY HH24:MI:SS') start_time
          ,to_char(FCR.actual_completion_date,'DD-MON-YYYY HH24:MI:SS') end_time
          ,ROUND((FCR.actual_completion_date  - FCR.actual_start_date)*86400) time_in_sec
          ,ROUND(AVG_VALUES.avg_time) AVG_TIME_IN_SEC
    from fnd_concurrent_requests FCR
        ,fnd_concurrent_programs_vl FCP
        ,(select  FCR1.concurrent_program_id
                 ,avg((FCR1.actual_completion_date  - FCR1.actual_start_date)*86400) avg_time
          from fnd_concurrent_requests FCR1
          group by FCR1.concurrent_program_id) AVG_VALUES
    where FCR.concurrent_program_id = FCP.concurrent_program_id
    and   (AVG_VALUES.concurrent_program_id = FCR.concurrent_program_id
           and
           ((FCR.actual_completion_date  - FCR.actual_start_date)*86400) > AVG_VALUES.avg_time)
    ORDER BY FCR.concurrent_program_id,FCR.actual_start_date desc;
    

    See you soon

    AJ

  • I need a javascript script that would allow an image to import into the drive. I have a Mac so LiveC

    I need a javascript script that would allow an image to import into the drive. Only, I have a Mac so LiveCycle is not an option.

    Screen shot 2010-07-17 at 12.42.41 AM copy.jpg

    OrangeWhip area is where a user would click to download an image.

    Screen shot 2010-07-17 at 12.43.12 AM.jpg

    I found this form and unable to crack how to proceed. Any suggestions?

    For forms created with Adobe Acrobat read this:

    http://www.PlanetPDF.com/Enterprise/article.asp?contentid=import_images_into_field_with _

  • A protocol that would provide the service for IPv4 and IPv6 traffic? (RIPv1, RIPv2, RIPng, BGP)

    A protocol that would provide the service for IPv4 and IPv6 traffic?

    • RIPv1
    • RIPv2
    • RIPng
    • BGP

    Hi SandeepTandel,

    ·         Your computer is on a domain network?

    ·         What exactly is the question do you face?

    Here the following protocols provide for IPv4 and IPv6 traffic or respectively:

    Ø Bng supports IPv4 and IPv6 protocols

    Ø RIPng supports IPv6

    Ø RIPv1 and RIPv2 supports IPv4

    Let us know if this information useful.

  • Need help! Will pay! Need a script that will change the size of the art on several files.

    I'll PayPal someone MONEY right now for this script. I have more than 400 files to process.

    System/software: Adobe Illustrator CS6 on PC
    Filetype (s): .ai

    I have more than 400 .ai files that contain work in all different sizes. I need a script that resizes the work at certain height or width specifications below.

    Some of the height of the work is greater than the width, some of the width of the work is greater than the height.

    If the overall of the art vertical height selected is greater than the width, I need the new height to be 166,6 pt
    If the horizontal art width selected is greater than the height, I need the new width to 166,6 pt

    The value of the width/height unchanged at 166,6 pt must be limited to the new values.

    If possible, I also need to change the size of the artboard to 216px x 216px. He is currently in 512px x 512px.

    Help, please! I'll pay!

    EmojiStickers wrote:

    I'll PayPal someone MONEY right now for this script. I have more than 400 files to process.

    Help, please! I'll pay!

    What is your budget?

    Check this thread and see if it helps, I have a script to resize work plans

    http://forums.Adobe.com/message/4853547#4853547

  • How to remove the selected area with a script that would ignore the fact if the selected area is transparent or the fact that it has no selection?

    Hello

    My friend works on an action, who would edit images by removing the white background color. However, there are a lot of images with transparent background or after some other actions have no selection who had to be removed. And now he is facing simple problem, simple remove this feature brings a lot of table and the error Stops.

    The ideal solution to this problem would be if it would ba a script who could remove the selection and ignore stops as no selection and transparent.

    Can anyone help with this one?

    Settle into the Photoshop scripts forum.

    With a script, you would just put your code in a try/catch block. This intercept errors such as the selection of a transparent area and do not stop your script:

    try{
         //your code here
         }
    catch(e){
         //either no code, or code to do something if you get an error.
    }
    
  • Need a script that lists the VM with a snapshot

    Hello

    I am relatively new to powershell scripting and even newer to the vSphere CLI. I have no problem reading and understanding scripts, but what makes one is another story. In any case, I'm looking for help to create a script that will check that all the vm's on all ESX hosts, if they have a snapshot and if they echo the name of the virtual machine to the screen.

    That's what I have so far but I'm stuck and probably on the wrong track. Any help/suggestions are welcome!

    $user = "< removed >.
    $passw = "< removed >.
    $VIServers = "< IP ESXi host >", "< IP ESX Host1 >', '< IP ESX Host2 >', '< IP ESX Host3 >', '< IP ESX Host4 >', '< IP ESX Host5 >', '< IP ESX Host6 >.

    {foreach ($VIServer to $ViServers)
    SE connect-VIServer-Server $VIServer - user $user-password $passw
    $vms = get-vmhost $VIServer | Get - vm

    {foreach ($vm to $vms)
    < code that checks to see if there is a snapshot and echo is the name of the virtual machine to the screen. Clueless >

    }
    }
    }

    Forward thanks!

    Kind regards

    Erik

    Why directly to the ESX: you?... To connect to vCenter instead and then it s very easy...

    Get - VM | Get-Snapshot | Select the virtual machine, name, Description, created. Kind created

    Kenth-

  • Script that checks - and stop - if the text is in excess

    In this script:

        var doc = app.activeDocument;     
        var mItems=doc.allPageItems;     
        var len = mItems.length;     
           
        // save measurement unit & set measurement unit to mm   
        //savedUnits = app.scriptPreferences.measurementUnit;   
        //app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS;   
           
        while(len--){     
            var mItem = mItems[len];     
            var mBounds = mItem.geometricBounds;     
            var mX = getRound(mBounds[1],3);     
            var mY= getRound(mBounds[0],3);     
             
            // fit content  
            if(mX == 10 && mY == 10){    
                mItem.fit(FitOptions.CONTENT_TO_FRAME);   
            } 
    
            if(mX == 6.999 && mY == 4.801){   
                resizeItem(mItem, 240,340)   
                mItem.move([10, 10]);   
                mItem.fit(FitOptions.CONTENT_TO_FRAME);
            }     
        }  
    var doc = app.activeDocument; 
    var _PDFfile = new File('\\\\C:/test\\' + app.activeDocument.name.replace (/\.indd$/, '.pdf')); 
    
    var _PDFExportPreset = app.pdfExportPresets.item('MyJobOptionName');  
    if (_PDFExportPreset == null){ 
       alert('PDF Export Presets not found'); 
       exit(); 
        }   
        app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES;                     
        doc.exportFile(ExportFormat.pdfType, _PDFfile, false,_PDFExportPreset);   
           
        /* round */     
        function getRound(number, digits) {     
                digits = (digits) ? Math.pow(10, digits) : 1000;       
                return Math.round(number * digits) / digits;       
        }    
        /* resize object */    
        function resizeItem(mItem, mWidth,mHeight) {   
            mBounds = mItem.geometricBounds;   
            mBounds[3] = mBounds[1] + mWidth;   
            mBounds[2] =mBounds[0] + mHeight;   
            mItem.geometricBounds = mBounds;    
        } 
    

    I also need the script to search for text in excess.

    So, something like this.

    1. If there is a textbox that contains text overset the scipt must stop all other actions in the script and warn on this subject.

    2. If there is no textbox text overset the script is run just with all actions.

    Hello

    Paste this snippet at the beginning of your code...

    var doc = app.activeDocument;
    var mTextFrames = doc.textFrames;
    for(var i = 0; i < mTextFrames.length; i++){
        if (mTextFrames[i].parentStory.overflows){
            alert('Overset TextFrames detected' );
            exit();
        }
    }
    
  • Specific main question - want to same leader between different text size, can't seem to get it...

    Hi all, I'm having a main problem I thought I found a few guidelines on fixing, but nothing I changed the question.

    I have a body of text with paragraphs alternating and headers. The headers are 13pt, the text of paragraph 11.  I want the main for all 12.  But no matter what I change the settings, I find myself with the question below, namely that space below the header is larger than the space.  I am at a loss.

    The leader of the space just above the word "Capture" is the same as the leader for the text of the paragraph. The leader of the space just below the word "Capture" is notably greater.  Yet no matter what I do, InDesign tells me that it's all the leader of 12 pt.

    Screen Shot 2016-03-23 at 8.16.07 PM.png

    Help?

    They are called space before and space after. You can find them in the paragraph attributes, but the best practice is to create paragraph styles.

  • Is it possible to write a script that would change the triangles to circles?

    I have an Excel file that outlines a scatterplot graph - using a logarithmic scale. Because it is not possible to create a logarithmic graph in Illustrator, I imported the graph in Excel to PDF. However, each data point is a triangle, and I would use circles that I created using OBJECT > GRAPH > DESIGN. Is there an easy way to replace the triangles with these circles?

    If you need to see the current file, let me know how to fix it.

    Thank you.

    I don't have Excel here...

    The place could be a clipping mask. Maybe you can only select all clipping masks and remove them (using select > object > clipping mask)

    But it can also be that this clipping mask is crucial for a reason any. Importing PDF you will often get a lot of clipping masks

  • Find the Document color space &amp; find samples that contain the content of the text block.

    Hello world

    I tried to figure this out for the last three days. I've tried everything I can think and search all over the internet (GitHub, Forums, etc.). I'm not a javascript Wizard, and certainly a Newb Extendscript.

    Try to determine the color space of the document. Last attempt was...

    alert(theDoc.properties.ColorSpace);
    

    Reminder on this:

    I have a datamerge which creates the attached fields from a CSV file. It is an internal reference to a color code. I am able to test cycle using the for loop an enter the color code. But I can't seem to find a way to seek the shades. One thought was to put in a table and sift through them. The color code provided is not swatch set name that makes things interesting. For example, name is 2297R - 19995, where 2297r is the color code for the text frame. Possible?

    main();
    // this is the function
    function main(){
    // setup some variables
    var theDoc = app.activeDocument; // active doc
    var thePage = theDoc.pages.item(0); // first page
    var theSwatches = theDoc.swatches;
    var list_of_swatches = theDoc.swatches.everyItem().getElements();
    var n = theDoc.swatches.length;
    var color;
    var rgbValues;
    var i;
    var     t;
    
    
    //Get all groups for this document:
    var theGroups = theDoc.groups;
    var theLayers = theDoc.layers;
    
    
    // Color Codes
    var primaryColor = thePage.textFrames.item("Primary Color Code"); 
    var secondayColor = thePage.textFrames.item("Secondary Color Code"); 
    var accentColor = thePage.textFrames.item("Accent Color Code"); 
    var matchGarmentColor = thePage.textFrames.item("Match to Garment Color Code"); 
    var lightTonalColor = thePage.textFrames.item("Light Tonal Color Code"); 
    var darkTonalColor = thePage.textFrames.item("Dark Tonal Color Code"); 
    var neutralColor = thePage.textFrames.item("Neutral Color Code"); 
    var greenColor = thePage.textFrames.item("Green Color Code"); 
    
    
    
    // Code Codes
    var primaryColorCode        =   primaryColor.contents;
    // var secondaryColorCode      =   secondaryColor.contents;
    // var accentColorCode         =   accentColor.contents;
    // var matchGarmentColorCode   =   matchGarmentColor.contents;
    // var lightTonalColorCode     =   lightTonalColor.contents;
    // var darkTonalColorCode      =   darkTonalColor.contents;
    // var neutralColorCode        =   neutralColor.contents;
    // var greenColorCode          =   greenColor.contents;
    

    Help or advice is greatly appreciated.

    Thank you.

    Hello

    ... There is a third source eventually:

    -content of the 'PartOfName' examination if there are spaces inside - in this case the search() method returns "-1"thus."

    (i.e. warning (PartOfName.length) ==> is it == 5?)

    Jarek

  • Hello. I need help developing a PowerCli script that will show me the current configuration of the video Ram of each individual virtual machine on a host\cluster or a vcenter. Can you help me?

    I have a script that will allow me to change the configurations of VRAM, but I need a script that retrieves the configuration of all virtual machines VRAM in my infrastructure.
    I need to get out information to a csv file and run this report on a monthly basis... can you help me?

    Right now my environment is mixed. I have Windows XP virtual machines set to 4 MB, Windows 7 virtual computers set to 8 MB and a subset of sall of virtual machines set to automatic detection of settings.

    I need to be able to recover these settings in a CSV file in order to use this information for comparisons of trdouble-shot performance issues...

    Thank you.

    vram.JPG

    Try something like this

    Get - VM |

    Select Name,

    @{N = "OS"; E={$_. ExtensionData.Config.GuestFullName}},

    @{N = "VideoRamMB"; E = {}

    [math]: Round (($_.)) ExtensionData.Config.Hardware.Device |

    where {$_-is [VMware.Vim.VirtualMachineVideoCard]} |

    (Select VideoRamSizeInKB - ExpandProperty) / 1 Ko, 1).

    }} |

    Export-Csv vm - videoram.csv - NoTypeInformation - UseCulture

  • The script that creates the default tabs in the margin of the document.

    I need a script that creates marks (1 cm margins: top, left, right, down and two others in the Center, a vertical and a horizontal) independent of the document size. Would look like this: whenever I create a new document, execute an action which rodadoria the script to create a document with the enclosed area, similar to the figure below: thank you!

    http://zip.NET/brsW9j

    #target photoshop;
    if(documents.length) main();
    
    function main(){
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var cm = activeDocument.resolution/2.54;
    var W =activeDocument.width;
    var H =activeDocument.height;
    guideLine(cm,"Vrtc");
    guideLine(cm,"Hrzn");
    guideLine(W-cm,"Vrtc");
    guideLine(H-cm,"Hrzn");
    guideLine(W/2,"Vrtc");
    guideLine(H/2,"Hrzn");
    app.preferences.rulerUnits = strtRulerUnits;
    app.preferences.typeUnits = strtTypeUnits;
    }
    function guideLine(position, type){
        var desc27 = new ActionDescriptor();
            var desc28 = new ActionDescriptor();
            desc28.putUnitDouble( app.charIDToTypeID('Pstn'), app.charIDToTypeID('#Pxl'), position );
            desc28.putEnumerated( app.charIDToTypeID('Ornt'), app.charIDToTypeID('Ornt'), app.charIDToTypeID(type) );
        desc27.putObject( app.charIDToTypeID('Nw  '), app.charIDToTypeID('Gd  '), desc28 );
        executeAction( app.charIDToTypeID('Mk  '), desc27, DialogModes.NO );
    };
    
  • I need a script to count all the text boxes on a form

    I created our organizational structure in Livecycle Designer.  (It doesn't "do" anything, it is just a flat document without subforms, checkboxes, etc.).

    Name of the employee is in a text box.  The text boxes are all named in the same way, starting with the word 'Employee' followed by the name of the employee.  For example, "EmployeeJohnDoe" "EmployeeJaneSmith" etc.

    I need to keep a number of our existing employees and so I need a script that is taken into account in all areas of text named "EmployeeXX".  The answer may go into a text field.

    Thanks in advance!

    Yes,

    The missing point was my bad.

    What do you mean text boxes? If you are referring to text (as opposed to the TextField objects) objects, then you would test against a class name 'draw' and a name "employee".

    Niall

  • I need a script, is - it possible?

    Hi all

    I need a script that does the following.

    I selects an object in AI CS3 and then run the script.

    1st. the script takes the object and fills with 100% magenta and makes a spot named CC.

    2. the script and then resizes the document to 1 "larger than the selected object and all the arts in the middle of the Commission of the art centres. (so if the object is 10.5 "x 15.7" the size of the installation document is replaced by 11.5 "x 16,7")

    3rd. the script then stores the size of the selected object and resizing again of the preparation of the document to the Clipboard. So if I paste it in Notepad, it would paste "10.5 X 15, 7-11, 5 X 16,7.

    That's it, there is no need to be exact about the syntax of collage but close if you know what I mean. This will be used in a production environment for a shortcut key to run the script would be nice.

    If I can help with this, would be great, please let me know if you can help.

    Anton

    There you go

    var doc = app.activeDocument;
    var salt = doc.selection;
    var doc2 = null;
    for (j = sel.length - 1; j > = 0; j-) {}
    var tachetГ = new SpotColor();
    Spotty.tint = 100;
       
    var spottyColor = new CMYKColor();
    spottyColor.magenta = 100;
       
    Spotty.spot = doc.spots.add ();
    spotty.spot.colorType = ColorModel.SPOT;
    Spotty.spot.Name = "CC";
    Spotty.spot.Color = spottyColor;
    salt [j] .fillColor = uneven;
    salt [j] .name = "##REFERENCE";
       
       
    nInc var = new UnitValue (1, 'in');
       
    var cWidth = new UnitValue (salt [j] .width, "pt");
    var cHeight = new UnitValue (salt [j] .height, "pt");
       
       
    Doc2 = app.documents.add (nInc.as ("pt"), DocumentColorSpace.CMYK, cWidth + cHeight.value + nInc.as ("pt"), 1);
           
    var June = salt [j] .duplicate (doc2);
    nTL var = parseFloat ((nInc.as ("pt") / 2));
       
    nTop var = cHeight.value + nTL;
       
    newSel.position = [nTL, nTop];
    grabAndCenterObjects();
       
    var txtFrm = doc2.textFrames.add ();
    txtFrm.contents = ' old dimensions: "+ cWidth.as("in").toFixed (2) + 'X' + cHeight.as("in").toFixed (2) +"-"new dimensions:" ' + (cWidth.as ("in") + 1) .toFixed (2) + 'X' + (cHeight.as ("in") + 1) .toFixed (2) + "------" «;"»
    Doc2.selection = null;
    txtFrm.selected = true;
    App.Copy ();
    txtFrm.remove ();
    }

    function grabAndCenterObjects (ignorePath) {}
    for (j = doc.pageItems.length - 1; j > = 0; j-) {}
    If (doc.pageItems [j]. Name.IndexOf("##Reference") >-1) continue;
    mElem var = doc.pageItems [j] .duplicate (doc2);
    var left = (doc.pageItems [j] .width > doc2.width)? -(doc.pageItems [j]. Width - Doc2.width) / 2: (doc2.width - doc.pageItems [j] .width) / 2;
    Top Var = (doc.pageItems [j] .height > doc2.height)? (doc.pageItems [j] .height + (doc.pageItems [j] .height - doc2.height) / 2): (doc.pageItems [j] .height + (doc2.height - doc.pageItems[j].height)/2);)
    mElem.position = [left, albums];
           
    }

    }

    It can be useful;

    see you soon;

Maybe you are looking for