I need to change the files have 1000

Hi!, I HAVE a folder with 400 files and an Excel using 1000 lines, each .ai file that contains a textframe with a rated 'note', I need is a script to help me open a .ai file, called "001.ai", and then select a textframe containing a specific "note", and then place the information that appears in Excel row 001 and so on in the file 002. I assign line 002.

Can anyone help please?

sfsf.jpg

excel.jpg

002.png

It will process up to 3 lines of text in the text column.

function import_csv_and_save(){  

    var myCSV = File.openDialog('Select CSV File...','CSV File:*.csv',false)||'';
    if(myCSV.exists === false){
        alert("issue with selection of csv file");
        return;
    }
    var csvCount = 0;
    var myARRAY = read_CSV();
    alert(csvCount + " Lines read from the CSV File");
    var myFOLDER = Folder.selectDialog('Select Source Folder...')||'';
    if(myFOLDER.exists === false){
        alert("issue with selection of source folder");
        return;
    }
    myDEST = Folder.selectDialog('Select Destination Folder...')||'';
    if(myDEST.exists === false){
        alert("issue with selection of destination folder");
        return;
    }
    var illustratorSaveOpts = new IllustratorSaveOptions();
    illustratorSaveOpts.compatibility = Compatibility.ILLUSTRATOR17;
    illustratorSaveOpts.compressed = true; // Version 10+
    illustratorSaveOpts.pdfCompatible = true;  // Version 10+
    illustratorSaveOpts.embedICCProfile = false;  // Version 9+
    illustratorSaveOpts.embedLinkedFiles = true;  // Version 7+
    illustratorSaveOpts.fontSubsetThreshold = 0.0;   

    var myFILES = myFOLDER.getFiles('*.ai');
    var myTEXT, testtext, newNAME, fC = 0;
    for(var h = 0; h < myFILES.length; h++){
        myNAME = myFILES[h].name.replace('.ai','');
        app.open(myFILES[h]);
        if(app.activeDocument.pageItems.getByName("Excel_Text") == 0){
            alert("TextFrame named 'Excel_Text' is not available in the activeDocument");
            return;
        }
        myTEXT = app.activeDocument.pageItems.getByName("Excel_Text");
        testtext = myTEXT.contents;
        for(var i = 0; i < myARRAY.length; i++){
            if(myARRAY[i][0] === myNAME){
                // test for multiline text  - - can deal with 1, 2, or 3 lines.
                if(myARRAY[i][1].substr(0,1) === '"'){
                    if(myARRAY[i+1][0].substr(myARRAY[i+1][0].length-1,1) === '"'){
                        myTEXT.contents = myARRAY[i][1].substr(1) + "\n" + myARRAY[i+1][0].substr(0,myARRAY[i+1][0].length-1);
                    }else if(myARRAY[i+2][0].substr(myARRAY[i+2][0].length-1,1) === '"'){
                        myTEXT.contents = myARRAY[i][1].substr(1) + "\n" + myARRAY[i+1][0]  + "\n" + myARRAY[i+2][0].substr(0,myARRAY[i+2][0].length-1);
                    }
                }else{
                    myTEXT.contents = myARRAY[i][1];
                }
                newFILE = new File(myDEST + "/" + myFILES[h].name);
                app.activeDocument.saveAs(newFILE, illustratorSaveOpts);
                 fC++
                break;
            }
        }
        if(myTEXT.contents === testtext){
            alert("processing of " + myFILES[h].name + " failed, Text was not changed.");
        }
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    }
    alert("Saved " + fC + " Files, into " + myDEST);  

    function read_CSV(){
        var myARRAY = [], line, lineArray;
        myCSV.open('r');
        while(!myCSV.eof){
            line = myCSV.readln();
            lineArray = line.split(',');
            myARRAY.push(lineArray);
            csvCount++
        }
        myCSV.close();
        return myARRAY;
    }
}
import_csv_and_save();

I should mention that I have no idea what will happen if there is more than 3;

I have not tried that and haven't added any code to intercept errors.

Tags: Illustrator

Similar Questions

  • We need to change the files that are used by some processes Opatch

    Hi all

    I apply the Patch.500 (Patch No.: 17529887) at our EMP 11.1.2.3 environment however I get error when I try to apply the Patch below.  I stopped all services of Hyperion before applying the patch. I also rebooted the server, once but always get the same error.

    Can someone help me please.

    Kind regards

    VJ

    So my only option would be Weblog Admin Server that all your services look at orders. Stop, disconnect you and login and try again.

    I don't know that should have checked the the Task Manager for active processes.

    Thank you

    Anjum

  • I need to change a file type of processing to PDF, doc, html txtor. the site that I am trying to download a file he needs in one of these formats

    I need to change a file type of processing to doc, pdf, txt or html. the site that I am trying to download a file needs in one of these formats. THX

    A complete answer would require that we know what "word processing" you use.  However, one of the types of files that are acceptable as 'pdf', you can install 3rd party freeware "CutePDF Writer" on your computer:

    CutePDF: <> http://www.cutepdf.com/products/cutepdf/writer.asp >

    Note that you need to install CutePDF and Ghostscript (both on the site) on your machine.  After you do, you will find that you have another printer on your computer named "CutePDF Writer".  Print the file of word processing for this virtual printer.  When you do so, it ask for a place to store your PDF file.  Give it a name and location, and it will create a PDF file for you.   Excellent Freeware (among my top 10) and works with any application you can print from.  Especially good for saving recipes online so that you don't waste any ink/paper.

    HTH,
    JW

  • When I try to save a document, I get the message "the file is opened by another program or read-only. I need to change the name to save him.

    When I try to save a document, I get the message "the file is opened by another program or read-only. I need to change the name to save him. If I optimize a document, I rename it to save it. If I opened a PDF file of the architect drawings and turn them into fashion landscape so that they are easier to read, I have to rename it. I searched on the parameters to look for something that I could turn off, but I found nothing.

    Make sure that the preview in Windows Explorer option is disabled.

  • Need to change the color of flight hover/mouseover on flash file - HELP!

    Hello world

    I am doing a project for work and need to change the color on this file I purchased from iStockPhoto. It's a flash world map file, which highlights the countries you select Green. I just want to change it so that all the highlights are made in red instead, but no am not a flash developer so don't know how to do it. I used flash briefly before for minor changes, but can't seem to find the answer anywhere. I tried Googling it... etc!

    This is the file that I bought.

    http://www.iStockphoto.com/file_closeup.php?id=2788655

    Any ideas would be MUCH appreciated!

    I took a glance at the file you sent. This file was made some time in an older version of Flash. I'm guessing that version 6. The Actionscript code in the movie is AS2. The file is in the scenes and consists of buttons, a lot, a lot, buttons. If you open the movie library, you will see a very long list of items that are used in the film. The first point, Afghanistan, for example is a single country. If you open this button in the editor, you will see there two executives, above. Each country drawing in each of these frameworks is composed of a group. That's why he shows an overview rather than the country in color.

    To change the color for the rollover State:

    1. go to section in addition to a single country.

    2. choose Select all from the Edit menu, or use the keyboard shortcut.

    3. choose a jump outside of the Edit Menu. This will separate each item in the group.

    4. use the selection tool to select the sketch.

    5. in the toolbar, select a new color line and filling for this country.

    Repeat if necessary. Save often. Work of a duplicate of the original film, just in case.

    Simply re-color of each country, the continents are made up of the country.

    I hope you have a lot of time, it will be horribly tedious.

  • Cannot open any programs, I think that somehow the files have been changed to .lnk files

    Original title: I'm unable to open programs in my Start Menu.

    When I click on an item in the beginning, all programs selection and click it, instead of opening, I get the name of the program, for example Microsoft Works... LNK and that's all I get the program never opens.  I think somehow that the files have been changed to .lnk files but do not know how it happened

    This happened for several months and I'm sure that there is an easy solution to return to what it was but don't know what.  I tried the system restore, but that did nothing and don't know what to do next.  Any ideas?  Thank you... betseyd112

    original title:. LNK files

    Hello

    1. what operating system you are using on the computer?
    2. did you of recent changes on the computer before this problem?
    3 are you facing this problem with a particular program or all programs?
     
    See the methods and check if that helps.
    Method 1: refer to the article for help.
    When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program
    http://support.Microsoft.com/kb/950505
     
    If the problem persists, create a new user account and check if that helps.
     
     
    Method 2
    Create a new user account-
    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account
    If you are not faced with the same question in a new user account, you can view the link below and use the steps provided to fix a corrupted - user profile
    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile
     
    Let us know the status of the issue.
  • Save a PDF file cannot be modified, losing the file HAVE changed.

    It's great that illustrator can edit PDF files and it's great that Illustrator can record on a non editable PDF. But why, for the love of sanity, I would like to save a PDF file cannot be modified, but then have the original file, currently open HAVE disappear leaving only this little pointless PDF file? I STILL want the file HAVE to remain the main current job file original. But it doesn't work.

    Or if, for some reason I can't understand, this behavior is necessary, and right, then at least it should show unequivocally that I am to modify a PDF file cannot be modified and strongly suggest to me that I might want to save an editable PDF or HAVE a file, or even do it automatically until I close the file (or Illustrator crashes as it is wont to do).

    I'm working on a file HAVE and I need to save a small file of WIP not editable for the customer display. I go to file - save as-> PDF / smaller file size / uncheck "preserve Illustrator editing capabilities". I send the PDF file to the client and continue to work and save, assuming that I'm working on the original. The file looks and behaves exactly as it did until I taped that, intuitively, I guess that is the file HAVE same, original, with the PDF file in a copy. However, when I come back the next morning, after having closed the file, only the low resolution not editable PDF file remains. The file doesn't help, and I have to redo all the work all the way back to the last time, I saved the file I saved the PDF.

    Much trouble, loss of hair, the time wasted, face Palm trees, etc.

    The thing is, I now /know/ does and I'm going out of my way to avoid it happening, but in the race at the end of the work and send commands to the client and manage multiple versions of files, it still happens. Now clearly this is my fault, but heck, Illustrator could behave much more usefully in this regard!

    Well, I must be missing something, I guess.

    I asked how "save a copy...". "is the way lasts, and you replied that you were referring to not using Save a Copy... So I re - submit that by using Save a Copy is the solution to your original problem.

    • Work in Illustrator; number of objects; several layers, live effects, etc.
    • Want a copy of WIP for the customer as you have described originally...
    • Choose file > save a copy... Format is not question could make no editable PDF, raster format, whatever...
    • Continue to work in Illustrator... under a State record which is absolutely no different than if I had never done the Save a Copy... There is no "silent dump' edit-ability or any such similar event. If I record, I save it HAVE original, or a new if the State was not saved.
  • When I connect to Photoshop CC I still can't go to the program - I need to change the host file?

    When I connect to Photoshop CC I still can't go to the program - I need to change the host file?

    Please follow it mentioned below as follows:

    1 complete the process / Task Manager tasks in the same order, as mentioned below the Manager tasks. See, Open the Task Manager

    • Creative cloud
    • Basic timing & sync to basic support
    • CC library & process CCX
    • Adobe Common Desktop
    • Adobe update daemon
    • Broker CIB Adobe
    • After that, everything that said adobe on it do a force quit for her

    2 - C:\Users\\AppData\Local\Adobe\ MAA UPDATER and two OOBE (App data & Program Data is hidden folder please see, Show files and folders hidden in Windows 7, 8.x, 10, or Vista)

    3 reset the hosts - IP addresses redirected file may prevent you to complete the authorization process.

    4 - CUT any security software installed with firewall system, also if your having any browser Add On installed for blocking advertising that turn off too.

    These changes are temporary you can restore these changes back to normal once your creative cloud app is running *.

    5 - raise the cloud creative app and connect

    Let us know if that helps.

  • Need to change the name of the file hard

    I need to change the name of the vmdk files which will get the game of football on behalf of virtual machines. Please anyone suggest me the steps to that end, the sameange the

    Hello

    Hope you are looking steps below.

    Renaming of files in virtual machine using Cold Storage Migration

    Virtual machine files can be renamed on the fly when cold Migration is initiated from the vSphere Client, only documents of the virtual machine are renowned.

    To rename the files:

    Log on to the VMware vSphere Client.

    Locate the virtual machine in your inventory to the host.

    Right-click the virtual machine, and then click Rename.

    Change the name of the virtual machine as required.

    Perform a cold migration to a new virtual machine data store.

    For more information, see:

    For ESXi/ESX 4.x, see Migration cold in the Guide of Administration of vSphere Datacenter.

    For ESXi/ESX 3.5, see Migration cold in basic management Guide.

    When the migration is complete, the files of the virtual machine, the name of the virtual machine configured in step 4.

    Note: If a virtual directory already exists on the data store with the same name, then the virtual target machine is placed in a new directory with annexed _1.

  • I need to change the language of my photoshop from Turkish to English but I have no choice but Turkish. How can I do is English? Thank you.

    I need to change the language of my photoshop from Turkish to English but I have no choice but Turkish. How can I do is English? Thank you.

    Hi eylulg1414701,

    • If you use a creative cloud subscription then you must uninstall the Turkish version of Photoshop.
    • Follow the article to change the language of creative cloud application and reinstall Photoshop.

    Change the language of your Cloud Creative applications

    • If you are using perpetual version then please uninstall the application and install it from the links in the language of your choice below:

    Other downloads

    Please let us know if it helps.

    Concerning

    Sarika

  • Why my Muse formatting does not disappear when I open the site in DW CS6? I need to change the PayPal shopping cart code to account for my shipping options. I exported the Muse test in a folder and then created a new Site in DW using this file, so any CSS

    Why my Muse formatting does not disappear when I open the site in DW CS6? I need to change the PayPal shopping cart code to account for my shipping options. I exported the Muse test in a folder and then created a new Site in DW with the help of this file, so all CSS should be there, but I don't see on the page about the elements without formatting, any stop to the left. Thank you!

    PS: Muse will be the most impressive program ever when they fix these bugs or drop because not every user will be paying through the nose for Business Catalyst. Grrrrrrrrr.

    Best approach would be not to use the PayPal widget and instead copy and paste the PayPal code embedded in an object > object to insert the HTML in Muse. This way you can edit the HTML code to embed PayPal code from Muse and without having to modify the exported code.

  • I need to change the DHCP Pool to the LIST of 'DECLINE' for WINDOWS 2003R2

    Applies to: Windows | Windows 7 | Security, privacy, and user accounts
    I need to change the DHCP Pool to the LIST of 'DECLINE' for WINDOWS 2003R2 - I am unable to view the file named MACLIST.txt in C:\windows\system32, even if the file system is open and I am the administrator with full user rights. I see this file name in the REGEDIT, but cannot display to open it and place it in the MAC addresses I want to REFUSE in the server pool. The operating system is Windows Server 2003R2 Standard - SP 2

    Please help

    PRyan

    Hi SummaCorp,

    Thanks for posting your question in the Microsoft answers Forum.  If you have questions about Windows Server 2003, please visit the Windows Server Community.

  • "You are not allowed to change the settings for this printer. If you need to change the settings, contact your system administrator.

    XP Pro, SP3. I downloaded the free Bullzip pdf printer. Somehow my old printer pdf in my printer disappeared list which I have used for years. I get this message when installing - "you are not allowed to change the settings for this printer. If you need to change the settings, contact your system administrator. I click ok and it ends, but it doesn't work. It does not appear in the printer control panel as a printer to change anything.

    I built this computer at home and I'm the only one using it. What is this function 'administrator '? I've never had to administrator on any program. Never. That is what it is?

    CNET is infamous for the grouping of things in its downloads as much a / v programs report as junk (I went through the same thing using eSet NOD32 has / v).  I seem to remember that if you ignore the warning and download the exe file and then use a tool like the free 7-zip to extract only the file necessary to run the program you want, you can work around the problem.

    For a pdf printer free which is not CNET - and works well - go here--> http://www.cutepdf.com/products/cutepdf/writer.asp

    EDIT TO ADD A LINK:

    See, for example, http://forums.cnet.com/7723-12543_102-582307/safe-downloads-cnet-com-sorry-but-not-anymore/

  • Need to delete the files and unwanted programs

    Original title - used laptop questions

    I inherited a laptop Toshiba family, now full of their information and mine, passwords, and others.  There a program according to Toshiba Recovery disk, which is easy enough for anyone to use?  I want just all the other information that mine are not off the computer, not necessarily the programs and associated files.  As my collection of mp3 curly and all my family photos.  The OS is Vista Home Basic 64 bit, if that matters. I just want to be able to do this at home rather than having someone paid to do. Thank you.

    Hello

    If you get a second hand computer, you must reinstall the operating system and start to configure it as you wish.

    There are other reasons why it is recommended, that probably does not apply in your case: Malware, p0rn, etc..

    There are several methods to reinstall Vista.

    There is no Windows Vista downloads available from Microsoft.

    You can contact your computer manufacturer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    "How to replace Microsoft software or hardware, order service packs and replace product manuals.

    http://support.Microsoft.com/kb/326246

    And if you have never received a recovery disk when you bought your computer, there should be a recovery Partition on the hard drive to reinstall Vista on how you purchased your computer.

    The recovery process can be started by pressing a particular combination of the key or keys at startup. (Power on / start)

    Maybe it's F10, F11, Alt + F10, etc., depending on the manufacturer.

    Ask them to the proper key sequence.

    And if you do not score a manufacturer of recovery on your hard drive, you should be able to make your own recovery from her disks to reinstall the operating system.

    Go to programs > name of the manufacturer of your computer > then their system or recovery tools software topics for them, depending on how it is formulated.

    If you can't find any reference to it, contact the manufacturer for advice on how to make these recovery disks.

    Some manufacturers have more available Vista recovery disks.

    If this happens, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Environment and development of the file:///accounts/1000/shared/... Access

    Hey guys;

    I'm trying to create a folder (photo album) and then to store images in this folder.

    In the development environment, it seems (I could be wrong) that I cannot write directly to the file:///accounts/1000/shared/camera folder to create a subfolder, but am limited to the access development environment (file:///accounts/1000/appdata/appname.debug.testDevrecords

    Is this the case?  The paths change when I publish the mode?

    She stood in my development.  I am making the album to take a picture, then the picture in the album created.  I am trying to use the actionscript codethen see the photo but I don't seem to have access to the location where I created the image.

    Any ideas out there.

    Thanks for any help.

    Check out this post for information on access to the shared area via the AIR APIs, note however that some of the debates made refers to the old limits from the beginning of the SDK which no longer apply.  The basic idea of the file. applies.

Maybe you are looking for