??? Simple Script needed for Illustrator?

Greetings.

I was wondering if anyone knew a well-known script there that for Illustrator that could automate this process (see attachment).

Much appreciated!

Screen Shot 2016-02-02 at 10.42.46 AM.png

as long as all boxes are aligned, then this should do the trick.

// number Items
var doc = app.activeDocument;
var items = doc.pathItems;
var loc = [];
for(var i = 0; i < items.length; i++){
    var item = items[i];
    loc.push([item.position[0], item.position[1], item]);
}

loc.sort(function (a, b) {
    if (a[1] > b[1]){
        return -1;
    }else if (a[1] < b[1]){
        return 1;
    }else{
        if (a[0] < b[0]){
            return -1;
        }else if (a[0] > b[0]){
            return 1;
        }
        return 0;
    }
});

for(i = 0; i < loc.length; i++){
    var txt = doc.textFrames.add();
    txt.contents = i+1;
    //alert(loc[1][2].left);
    txt.position = [loc[i][2].left+10,loc[i][2].top - 10];
}

Tags: Illustrator

Similar Questions

  • I have plan of creative photography of cloud, but also need for illustrator and indesign, what diet should I go for?

    I have plan of creative photography of cloud, but also need for illustrator and indesign, what diet should I go for?

    Reference:

    https://creative.Adobe.com/plans

    Concerning

    Megha Rawat

  • Script needed for radio button/date field

    Hello

    I am currently using Adobe Lifecycle Designer ES.  I have a form that contains two radio buttons (each dependant on the other).  One of the option buttons, if it is enabled, has a date field that I have needed to fill if this option button is selected.  I suppose that this could be done with an "if" statement, but I'm not very good at the code and I was wondering if anyone can help?  Thank you.

    Hello

    I have an example here: http://assure.ly/hxHupW.

    You can change the required property using script.

    To make a field required, you set the property to "error". Considering that, to make an optional field, you set the property to "disabled".

    If one considers that the value of the radiobutton that you want to use to define the mandatory datefield is '1', then the code following JavaScript in the click event of the radiobutton exclusion group:

    if (this.rawValue == 1)
    {
         datefield.mandatory = "error";
    }
    else
    
    {
         datefield.mandatory = "disabled";
    }
    

    Hope that helps,

    Niall

  • How can I change a Script of Action Illustrator

    Hello

    Is there a quick way to easily edit an Action Script in Illustrator? I downloaded a small Script Action for Illustrator and I just want to change some values within some commands, so it would better correspond to my needs. I looked in aid of Illustrator, but there is nothing on it, I think.

    Thank you for answering,

    Robert Marchand

    [email protected]

    It is the way to do it.

  • do I need Windows PowerShell integrated scripting tool for home computer and access to the internet, powershell

    do I need Windows PowerShell integrated scripting tool for computer and internet access

    No you didn't he need for home computer and internet access

  • I bought an annual individual license for Illustrator and also one for Photoshop + Lightroom, now, I realized that I need Acrobat Pro, and need to buy another individual license that will cost me the 3 together more than the creative cloud all opt

    I bought an annual individual license for Illustrator and also one for Photoshop + Lightroom, now, I realized that I need Acrobat Pro and need to buy another individual license that will cost me the 3 together over the whole creative cloud option that includes all applications. Can I Exchange my 2 subscriptions for the rather creative cloud and pay only the difference?

    Single update for all http://forums.adobe.com/thread/1235382 clouds can help

  • We are a company who needs photoshop/illustrator for various computers

    If we are a company that needs photoshop/illustrator is the same price / membership? or y at - it another way to do this for different computers?

    It is unclear what you mean when your application "which is the same price / members?   -What are the same price?

    Creative cloud plans

    https://creative.Adobe.com/plans

  • ??? Simple SCRIPT of Illustrator necessary?

    Greetings.

    I was wondering if anyone knew a well-known script there that for Illustrator that could automate this process (see attachment).

    Much appreciated!

    Screen Shot 2016-02-02 at 10.42.46 AM.png

    The CADtools plugin has a feature of numbering.

    You might also: first select

    Type > threaded text > do

    Use Excel to generate the numbers and a return delimiter

    Copy and paste into the text block

  • I bought simple-app creative cloud for Illustrator (at least) membership, but it is not installed in my computer

    I bought simple-app creative cloud for Illustrator (at least) membership, but it is not installed in my computer

    Hello

    Please refer to the help documents below to download the application Adobe CC:

    Creative cloud to desktop

    Download, install, update or uninstall applications

    Once the CC Office application installed, you can install the Illustrator application from there.

    Kind regards

    Sheena

  • I need a serial number for Illustrator CC

    I need a serial number for Illustrator CC

    There is no serial number. You simply sign in the CC app refer to this article for the basics:

    Log, activation, or connection errors. CS5.5 and later versions

    Mylenium

  • I need a serial number for Illustrator CS6

    I need a serial number for Illustrator CS6

    Hello

    What do you mean with "I need a serial number for Illustrator CS6". If you do not have buyed it before, you can't get it here. If so, you should have a look at the Adobe database to see what is stored/recorded on your accounts.

    You will find general information about your Adobe account > https://www.adobe.com/account.html and there at

    find your serial number > http://helpx.adobe.com/x-productkb/global/find-serial-number.html

    If necessary and for any other question, click on through http://helpx.adobe.com/contact.html and 'open' Please use the cat, I had the best experiences. An employee of Adobe Preran I quote: the chat button is enabled as soon as there is an available agent to help.

    Hans-Günter

  • Photoshop layer redesign, rename the script for Illustrator

    The Photoshop scripting guru Paul R more to RetouchPro has created a really cool to rename script and layers of selected Photoshop batch numbers. I did find something similar on the side of the Illustrator.

    He gave his permission for me to post it here in hopes that some Illustrator scripting genius could come up with a similar script for Illustrator. It would be terribly difficult to convert into something that could use Illustrator?

    http://www.mediafire.com/file/g7usr73u0236p0a/rename _ & _Renumber_Selected_Layers.jsx

    http://www.mediafire.com/file/dbah74x13bsa74c/rename _ & _Renumber_Selected_Layers.jsx.zip

    rename-layers.png

    Hola Julio, I updated the script to rename the sublayers or visible layers and also fixed the color

    #target illustrator
    
    main();
    function main(){
        if(!documents.length) return;
        //var allLayers = app.activeDocument.layers;
        var win = new Window( 'dialog', '' );
        g = win.graphics;
        //  var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]); // CS5
        var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.50, 0.50, 0.50, 1]); // CS6
        g.backgroundColor = myBrush;
        win.orientation='stack';
        win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
        win.g1 = win.p1.add('group');
        win.g1.orientation = "row";
        win.title = win.g1.add('statictext',undefined,'Rename Visible Layers or Sublayers');
        win.title.alignment="fill";
        var g = win.title.graphics;
        g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
        win.g5 =win.p1.add('group');
        win.g5.orientation = "column";
        win.g5.alignChildren='left';
        win.g5.spacing=10;
        win.g5.st1 = win.g5.add('statictext',undefined,'New layer name');
        win.g5.et1 = win.g5.add('edittext');
        win.g5.et1.preferredSize=[250,20];
        win.g10 =win.p1.add('group');
        win.g10.orientation = "row";
        win.g10.alignment='fill';
        win.g10.spacing=10;
        win.g10.st1 = win.g10.add('statictext',undefined,'Serial Number');
        win.g10.et1 = win.g10.add('edittext',undefined,'1');
        win.g10.et1.preferredSize=[50,20];
        win.g10.et1.onChanging = function() {
          if (this.text.match(/[^\-\.\d]/)) {
            this.text = this.text.replace(/[^\-\.\d]/g, '');
          }
        };
        win.g10.st1 = win.g10.add('statictext',undefined,'Length');
        var nums=[2,3,4,5];
        win.g10.dl1 = win.g10.add('dropdownlist',undefined,nums);
        win.g10.dl1.selection=0;
        win.g15 =win.p1.add('group');
        win.g15.orientation = "row";
        win.g15.alignment='fill';
        win.g15.cb1 = win.g15.add('checkbox',undefined,'Reverse layer order');
        win.g15.cb2 = win.g15.add('checkbox',undefined,'Rename Sublayers Only');
        win.g100 =win.p1.add('group');
        win.g100.orientation = "row";
        win.g100.alignment='center';
        win.g100.spacing=10;
        win.g100.bu1 = win.g100.add('button',undefined,'Rename');
        win.g100.bu1.preferredSize=[120,30];
        win.g100.bu2 = win.g100.add('button',undefined,'Cancel');
        win.g100.bu2.preferredSize=[120,30];
        win.g100.bu1.onClick=function(){
            if(win.g5.et1.text == ''){
                alert("No layer name has been entered!");
                return;
            }
            win.close(0);
    
            var sublayersOnly = win.g15.cb2.value;
            var visibleLayers = [];
            getVisibleLayers (app.activeDocument, visibleLayers, sublayersOnly);
    
            if(win.g15.cb1.value) visibleLayers.reverse();
    
            for(b=0; b		   
  • Color select Script needs refining

    Hello

    I've been running this simple script (created by an end PS scripter) in action:

    #target Photoshop

    main() {} function

    if(!documents.) Length) return;

    app.activeDocument.colorSamplers.removeAll ();

    var X = activeDocument.width.as('px')/2;

    var sample = activeDocument.colorSamplers.add ([new UnitValue (X, 'px'), new UnitValue (1, 'px')]);

    app.backgroundColor = sample.color;

    app.activeDocument.colorSamplers.removeAll ();

    }

    main();

    It selects the top center pixel color, sample, for the bottom point. Now I need to select a 5 x 5 moy. Second, is there a way to hide the INFORMATION pane, which opens by running the script? This appears not be called from an action, of course, and I'm not script.

    Thanks for any help.

    This should make an average...

    #target Photoshop
    function main(){
    if(!documents.length) return;
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    try{
    app.activeDocument.colorSamplers.removeAll();
    var X = activeDocument.width/2;
    var LB=[];
    LB[0] = X.value;
    LB[1] = 1;
    LB[2] = X.value +5;
    LB[3] = 6;
    var tmpColour = new SolidColor();
    var savedState = activeDocument.activeHistoryState;
    activeDocument.selection.select([[LB[0],LB[1]], [LB[2],LB[1]], [LB[2],LB[3]], [LB[0], LB[3]]], SelectionType.REPLACE, 0, false);
    activeDocument.activeLayer.applyAverage();
    var sample = activeDocument.colorSamplers.add( [ new UnitValue( X+1, 'px' ), new UnitValue( 2, 'px' ) ] );
    tmpColour=sample.color;
    activeDocument.activeHistoryState = savedState;
    app.backgroundColor=tmpColour;
    app.preferences.rulerUnits = startRulerUnits;
    }catch(e){alert(e + " - " + e.line);}
    }
    main();
    

    I was not able to stop the information panel so I add to my open panels is not intrusive.

  • A PC can operate effectively WITHOUT the need for anti-virus software?

    Come to think if the first PC I've had and the worms Blaster threatened everyone...

    I do not just shoot when to install my anti-virus software, I need to close my Windows Firewall... 2 + 2 = and Yes, when I did I got the virus of shit...

    If only I had not installed the Norton... do you not think that any PC can operate without the need for anti-virus software knowing that you must close

    the Windows firewall and use theres rather...?

    I wonder!

    Hello

    It would be unwise to try to start without antivirus/antispyware are has just too many real threats and
    methods for malware to attack the system. If you attempt to do if of course you have redundant and
    current backups.

    Here's what I use and recommend: (these are all free and very effective versions.)

    Avast and Prevx proved extremely reliable and compatible with all I have
    launched on them. Microsoft Security Essentials and Prevx have also proven to be very
    reliable and compatible. Use MSE or Avast and Prevx, Prevx 3 but not all.

    Avast Home free - stop any shields is not necessary except leave the file system, Web,.
    Operational network (Script and behavior are also recommended in Ver 6 +).

    Prevx - Home - free

    Windows Firewall

    Windows Defender (is not necessary if you use MSE)

    Protected IE - mode

    IE 8 - SmartScreen filter WE (IE 7 phishing filter)

    I also IE always start with asset if filter InPrivate IE 8.
    (It may temporarily turn off with the little icon to the left of the + bottom
    right of IE)

    Two versions of Avast are available 6.x and 4.8 x

    Avast - home - free - 6.x stop shields you do not use (except files, Web, network, &)
    Shields of behavior) - double click on the icon in the Notification area - real time Orange - click on the
    Shield that you want to stop - STOP. To stop the Orange icon to show an error indicator-
    Click on the Orange icon - top right - settings - click on the status bar - uncheck shields you
    disabled - click OK
    http://www.avast.com/free-antivirus-download

    Avast 4.8 x - home - free - stop shields, you don't need except leaving Standard, Web,.
    and the network running. (Double-click the blue icon - look OK. - upper left - Shields details
    Finish those you don't use).
    http://www.avast.com/free-antivirus-download#TAB4

    Or use Microsoft Security Essentials - free
    http://www.Microsoft.com/Security_Essentials/

    Prevx works well alongside MSE or Avast

    Prevx - home - free small, fast, exceptional protection CLOUD, working with other security
    programs. It is a single scanner, VERY EFFICIENT, if it finds something come back here
    or use Google to see how to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    Also get Malwarebytes - free - use as scanner only. If you ever think malware and that
    would be unusual with Avast and occasional Prevx running with the exception of a low level cookie
    (not much), to UPDATE and then run it as a scanner. I have a lot of scanners and they
    never find anything of note that I started to use this configuration.
    http://www.Malwarebytes.org/products/malwarebytes_free

    I hope this helps and happy holidays!

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Download Webcam video to need for Email, file TOO big, a FIX for THIS

    I did my little cheesy video, after talking to members of the family that have not seen me for ten years. I made a funny video, but when I tried to "connect" with my Gmail, he say permits. NO DOWNLOAD. So, I tried my new, rarely used live.com account and he tried to load, but the green light of the progression took forever. Then I tried with creativity to post on Youtube.com and it said (1:11:06), I'm like, WHAT's going to take a frickin' TIME to display 7 scarce minutes of fluff. I get hurt on it that I want to connect with my family and all of this could be resolved if I was a millionaire (credit needed for the tutorial). Post people all the time now, there must be a great way to do it. Not particularly warned of the web, but this seems to be a no-brainer. Help me if you can in this 'simple' company to load my video in my family.

    Hello blkenuff,

    Thank you for visiting the Microsoft answers Site.

    You can see the links below for more information about sending attachments in Windows Live Mail.

    http://help.live.com/help.aspx?market=en-us&project=MailFull&querytype=topic&query=WL_Mail_TROU_BlankAttachmt.htm

    In addition, you can also view the link below for more information on SkyDrive, which is a free service that allows you to store and share your files online.

    http://windowslive.com/online/SkyDrive

    Thank you

    Mary
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • How can I back up/downgrade Firefox 5 for Firefox 4? I had nothing else problems with Firefox 5.

    I had any other problems with it. At least once a day, it crashes. It crashes even on mozilla.com with no other open tabs. Sites are slow. Much slower than they should be. Google takes a good minute to 2 minutes to load. It's a roll of the dice for m

  • Keyword auto search does not work

    In firefox 3.x, when I typed in a search by keyword in the address bar, if there is a high degree of match firefox would take me directly on the site (that is, when I type in 'google docs' and press ENTER, it takes me directly on the google docs site

  • DCOM issue

    I connect to a National Instruments OPC server. My simple test app uses an indicator whose ownership DataSocket hardcoded to a tag on the OPC server. This application works on some machines and on the other the DataSocket will never connect. I think

  • National Instruments PCI - 1410 Image grabber in Labview

    What type of input node must be used to take images from a camera connected to the NI PCI-1410 image grabber Labview map. Thank you. -Tim

  • Windows 7 Administrator password change problem

    I have Windows 7 Home premium installed. Recently, strange thing happens on the local administrator account. When I change the admin password, it is accepted and when I log off and try to connect again, the new password does not work. He returned to